google-maps-api-3

Migrating my HTML Google MAP API version 2 to version 3

╄→尐↘猪︶ㄣ 提交于 2020-01-01 09:22:52
问题 I will really appreciate help for this. My html v2 file with some temporary key works fine. I am getting locations from some XML, create different colors markers and add some URLs also from XML attributes in Info Window(not too much complicated). Now I need to migrate this to v3. I found some equivalents for functions from v2 but I didn't find for GDownloadUrl( for loading XML) and also GIcon(G_DEFAULT_ICON); Can someone please look at both of my codes and tell me how to change to make this

Google Map KML layer placemark click event return ZERO_RESULTS

折月煮酒 提交于 2020-01-01 09:09:31
问题 Attaching listener to KML layer: var layer = new google.maps.KmlLayer('http://sites.google.com/site/kmlprototypes/kmls/temp.kml?dc_=' + Math.random(), {suppressInfoWindows:true,preserveViewport:true}); layer.setMap(map); google.maps.event.addListener(layer, 'click', function (obj) { alert(obj.featureData.id); }); KML file is valid (checked by validation api), you may find it here. Each placemark in XML has id attribute like: <Placemark id="46"> <Style> <IconStyle> <Icon> <href> <![CDATA[http:

Google Map KML layer placemark click event return ZERO_RESULTS

隐身守侯 提交于 2020-01-01 09:09:12
问题 Attaching listener to KML layer: var layer = new google.maps.KmlLayer('http://sites.google.com/site/kmlprototypes/kmls/temp.kml?dc_=' + Math.random(), {suppressInfoWindows:true,preserveViewport:true}); layer.setMap(map); google.maps.event.addListener(layer, 'click', function (obj) { alert(obj.featureData.id); }); KML file is valid (checked by validation api), you may find it here. Each placemark in XML has id attribute like: <Placemark id="46"> <Style> <IconStyle> <Icon> <href> <![CDATA[http:

Toggle Google Maps markers

北慕城南 提交于 2020-01-01 07:33:04
问题 I taken some code form another post to start me off but trying to get it to do what I need. I need to set up functions to show/hide markers when they are checked and also to assign appropriate icons to the marker categories ie, Walk, Fish. To start I need to get the show hide functions to work which currently aren't. You can find a demo here...http://jsfiddle.net/huMtu/ 回答1: The problem you have is that the locations variable is an array of information - its not actually the marker on the

Google map api search markers from database in specifc area

社会主义新天地 提交于 2020-01-01 06:08:30
问题 I've set up google map API that loads data from mysql database and display markers. the problem I am facing is that all the markers shows up at once no matter whatever I input in search location field.............. I want to show only the searched area and markers in that area. It shouldn't display all the markers at once but only the marker in the searched area. I mean I want to zoom the map to the searched area. Currently if I've only one marker map zoom in to show that but if I've many

Google map api search markers from database in specifc area

只愿长相守 提交于 2020-01-01 06:08:08
问题 I've set up google map API that loads data from mysql database and display markers. the problem I am facing is that all the markers shows up at once no matter whatever I input in search location field.............. I want to show only the searched area and markers in that area. It shouldn't display all the markers at once but only the marker in the searched area. I mean I want to zoom the map to the searched area. Currently if I've only one marker map zoom in to show that but if I've many

Google map api search markers from database in specifc area

巧了我就是萌 提交于 2020-01-01 06:08:08
问题 I've set up google map API that loads data from mysql database and display markers. the problem I am facing is that all the markers shows up at once no matter whatever I input in search location field.............. I want to show only the searched area and markers in that area. It shouldn't display all the markers at once but only the marker in the searched area. I mean I want to zoom the map to the searched area. Currently if I've only one marker map zoom in to show that but if I've many

Google Maps API - Midpoint along route [duplicate]

落爺英雄遲暮 提交于 2020-01-01 06:03:10
问题 This question already has an answer here : Midpoint of route in google maps (1 answer) Closed 3 years ago . I've been playing around with the Google Maps/Google directions API. Does anyone have an inkling on how I might be able to find the mid-point along a route, not the geographic midpoint. Ideally I'd like to find the lat and long values of this midpoint. Any thoughts? I'm a bit stumped and hoping I may be able to find a suggestion without going crazy trying to find the answer myself. 回答1:

PHP code for adding new place to Google Places via API

风流意气都作罢 提交于 2020-01-01 04:56:07
问题 I'm working on integrating Google's Places API into a web app. I've been able to successfully create code to allow users to search for places using the API and to display results in the app, so that's cool. What I haven't been able to figure out is how to allow users of the app to add new places. Something which Google says is doable. They have some documentation on it here - https://code.google.com/apis/maps/documentation/places/#adding_a_place But no example code and I'm having some

Styling Google Maps - Javascript API v3 - Outline on coastlines?

删除回忆录丶 提交于 2020-01-01 04:54:05
问题 I'm trying to style up a Google Map to match a design I've been given, and on the design there is a stroke around the outside of all the countries, as well as a stroke on dividing borders. The effect I'm going for is as below: My code for the styling is currently as follows: var styles = [ { featureType: "water", stylers: [ { visibility: "on" }, { color: "#ffffff" } ] },{ featureType: "landscape", stylers: [ { color: "#f7f7f5" } ] },{ featureType: "road", stylers: [ { visibility: "off" } ] },