基本上,我想在我的地图中间展示一个十字路口, 留在中间,当用户盘旋时。
我正是在谈论这个, 除了这个例子执行不力,
http://www.daftlogic.com/sandbox-google-maps-centre-crosshairs.htm
有没有人想过用V3地图Api来实施这个计划?
基本上,我想在我的地图中间展示一个十字路口, 留在中间,当用户盘旋时。
我正是在谈论这个, 除了这个例子执行不力,
http://www.daftlogic.com/sandbox-google-maps-centre-crosshairs.htm
有没有人想过用V3地图Api来实施这个计划?
我所看到的最平滑的方法是使用 KML 文件 。 < a href="http://maps.google.com/maps? f=q&hl=en&q=http://kmlcriple.googlepages.com/SamplesInMaps.kml&ie=UTF8&ll=36.879621,-534375&spn=103.772916. 208.476563&z=2&om=1, rel="nofollow"。 这是原始的 。
我将KML剥除到最起码的限度:
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Document>
<ScreenOverlay>
<Icon>
<href>http://code.google.com/apis/kml/documentation/crosshairs.png</href>
</Icon>
<overlayXY x="0.5" y="0.5" xunits="fraction" yunits="fraction"/>
<screenXY x="0.5" y="0.5" xunits="fraction" yunits="fraction"/>
<rotationXY x="0.5" y="0.5" xunits="fraction" yunits="fraction"/>
<size x="0" y="0" xunits="pixels" yunits="pixels"/>
</ScreenOverlay>
</Document>
</kml>
在地图代码中,您需要做的只是设置 KML 图层, 选项为 < code> preserverveViport= true code> 。 请注意, 如果您在本地重新测试 KML 文件, 仍然需要上传到公共位置 。
var crosshairLayer = new google.maps.KmlLayer(
http://freezoo.alwaysdata.net/justcrosshair2.kml ,
{preserveViewport: true});
crosshairLayer.setMap(map);
(在两个 KML 文件中,它们重新代表两个独立的图标 。)
I am plotting flight paths between Airports that I have Latitude and Longitude values for onto a Google Map (v3 of the API). However unlike v2, v3 does not seem to have an option to put a Polyline on ...
This code have been working until I updated last night. The code works perfectly on my localhost, but I get an error on my test server. The error message (from Firebug) is "map.set_center is not a ...
I need to have only one InfoWindow open on my Google Map. I need to close all other InfoWindows before I open a new one. Can someone show me how to do this?
I m creating a new mashup on top of Google Maps. It s simple enough that I chose to use V3 to provide longer life span. However, there s some special needs that Google Maps infoWindow doesn t provide....
I m about to start a Google map based project and am wondering if the release version of GMaps v3 has most of the features that are available in v2, or if it would be best to stick with v2 for now. Is ...
In Google Maps API v2 we can set to marker an option bouncy:true. It adds to marker eye-candy ability - after dragging this marker, it is bouncing. Is it possible to do in API v3 ?
I ve got some Javascript/HTML code which displays a variable number of maps dependent on what the user selects. I ve worked how to dynamically create multiple maps on a page - that s well documented. ...
I ve a custom google map with different points: Markers[0] = new Array(new GMarker(new GLatLng(45.0, 9.0)), "Location1", "<strong>Address Line</strong><br/>Some information"); ...