小编unk*_*own的帖子

Google Maps Api - 从一系列点绘制路线

我想在谷歌地图上连接8点,以便他们共享线路(道路).我想点击点云显示一点点描述.目标是显示汽车指向的路线.

我有脚本用点制作地图,但我不知道如何连接标记.

var MapPoints = '[{"address":{"address":"plac Grzybowski, Warszawa, Polska","lat":"52.2360592","lng":"21.002903599999968"},"title":"Warszawa"},{"address":{"address":"Jana Paw\u0142a II, Warszawa, Polska","lat":"52.2179967","lng":"21.222655600000053"},"title":"Wroc\u0142aw"},{"address":{"address":"Wawelska, Warszawa, Polska","lat":"52.2166692","lng":"20.993677599999955"},"title":"O\u015bwi\u0119cim"}]';

var MY_MAPTYPE_ID = 'custom_style';
function initialize() {

if (jQuery('#map').length > 0) {

    var locations = jQuery.parseJSON(MapPoints);

    window.map = new google.maps.Map(document.getElementById('map'), {
        mapTypeId: google.maps.MapTypeId.ROADMAP,
        scrollwheel: false
    });

    var infowindow = new google.maps.InfoWindow();
    var bounds = new google.maps.LatLngBounds();

    for (i = 0; i < locations.length; i++) {
        marker = new google.maps.Marker({
            position: new google.maps.LatLng(locations[i].address.lat, locations[i].address.lng),
            map: map
        });

        bounds.extend(marker.position);

        google.maps.event.addListener(marker, 'click', (function (marker, i) {
            return function …
Run Code Online (Sandbox Code Playgroud)

google-maps

7
推荐指数
1
解决办法
3万
查看次数

admin-ajax.php - 阻止 htaccess

如果没有 GET=action 或 POST=action,我需要 htaccess 重写来阻止请求。

如果有人跑

 example.com/wp-admin/admin-ajax.php
Run Code Online (Sandbox Code Playgroud)

然后他会看到错误 404。

我认为这应该可以重写,但我不知道这是如何工作的:

  RewriteRule ^wp-admin/admin-ajax.php$ index.php [L,QSA]
Run Code Online (Sandbox Code Playgroud)

wordpress .htaccess admin-ajax

0
推荐指数
1
解决办法
4708
查看次数

标签 统计

.htaccess ×1

admin-ajax ×1

google-maps ×1

wordpress ×1