google-maps-api-3

How i can do a gmap v3 with a multiples markers and these are draggable

我们两清 提交于 2020-02-05 14:55:08
问题 var marker = new google.maps.Marker({ position: myLatLng, map: map, icon: image, title: tittle, zIndex: i, draggable: true }); google.maps.event.addListener(marker, 'drag', function() { $("input[name='request']").val(marker.getPosition()); }); google.maps.event.addListener(marker, 'dragend', function() { $("input[name='request']").val(marker.getPosition()); }); the event is added to a single marker and need to be for many at least 1000 or even infinite. 回答1: use array of positions and for

Passing XML markers to Google Map

拈花ヽ惹草 提交于 2020-02-05 06:27:51
问题 I've been creating a V3 Google map based on this example from Mike Williams http://www.geocodezip.com/v3_MW_example_linktomap.html I've run into a bit of a problem though. If I have no parameters in my URL then I get the error "id is undefined idmarkers [id.toLowerCase()] = marker;" in Firebug and only one marker will show up. If I have a parameter (?id=105 for example) then all the sidebar links say 105 (or whatever the parameter in the URL was) instead of their respective label as listed in

Constant error return on google maps maxZoomService.getMaxZoomAtLatLng()

戏子无情 提交于 2020-02-04 14:31:33
问题 I'm experiencing a big problem with googles maxZoomService.getMaxZoomAtLatLng , since it absolutely random decides to return error state, sometimes 10 times in a row, sometimes it works, but I can't figure out why the zoom sometimes just fails. I tried to solve it by retrying the request multiple times, but it seems like that if I get an error on the first request I'll get the error for all retries too. At the same time I'm facing an issue that got listed in another topic but this isn't my

Sending a details request to Google Places API - (CORS error)

帅比萌擦擦* 提交于 2020-02-03 09:55:35
问题 I'm trying to augment the collection of photos I have for public artworks in this project I'm working on with photos from the Google Places API. It says here that you can send a details request to get an array of ten photos. Eventually I will unpack the response to get Google's photo reference for each photo and make requests for each photo in the array and display it. Unfortunately, this plan breaks when I send my details request. This is the exact error I'm getting: Fetch API cannot load

Google Directions API return different waypoint_order and legs

为君一笑 提交于 2020-02-03 03:01:06
问题 I'm developing a system to trace route using Google Maps API. I have the points of origin and destination and between these points there are some waypoints. By tracing the route Google returns me the best route and mark these points on the map. We display the route data in a div. My function that calculates the route, the part that returns the data looks like this: directionsService.route(request, $.proxy(function(response, status){ if (status == google.maps.DirectionsStatus.OK) {

Find zipcodes inside polygon shape using google maps api [closed]

徘徊边缘 提交于 2020-02-02 12:51:50
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago . I'm working on a google map application. I am drawing a polygon on GMap and getting the area covered by it. I need to find out how many zipcodes are there inside the covered area. How can I proceed using google maps API? Any suggestion? 回答1: You'll need, as david strachan said,

Launch Google Maps On Blazor

不问归期 提交于 2020-02-02 05:48:07
问题 I am trying to launch Google maps on my Server side Blazor app using JSInterop. I seem to have tried just about everything but can't get the map to show. Unfortunately there is very little samples if any about it on the internet since it's a fairly new framework and I am equally just getting my feet wet on Blazor myself, so I am probably doing a whole lot of things wrong. Any nudge in the right direction would be appreciated. In my component file, I have: @page "/MapTest" @inject IJSRuntime

LatLng from Google Maps Polygon getPath()

。_饼干妹妹 提交于 2020-01-31 07:07:51
问题 Based on the Google Maps JavaScript API v3 documentation, google.maps.Polygon class's getPath() function returns an MVCArray . In a straightforward case, a Polygon's path can be a single array of LatLngs that are converted to the MVCArray type upon being passed into the google.maps.Polygon class's setPath() function. The above case is what I'm dealing with currently. I pass in an array of LatLngs , and return (what I assume is) an MVCObject when I call getPath() on my Polygon object. My

Google Maps Embed + Search box

耗尽温柔 提交于 2020-01-30 08:43:55
问题 I'm trying to make a map for my website, that will show a few markers of restaurants. I would also like people to be able to search the map, so they can look for an address and would be able to see the restaurants in that area. I got a code for the map with markers like i want it: <script src='https://maps.googleapis.com/maps/api/js?key=&sensor=false&extension=.js'></script> <script> google.maps.event.addDomListener(window, 'load', init); var map; function init() { var mapOptions = { center:

Google Maps Embed + Search box

£可爱£侵袭症+ 提交于 2020-01-30 08:43:23
问题 I'm trying to make a map for my website, that will show a few markers of restaurants. I would also like people to be able to search the map, so they can look for an address and would be able to see the restaurants in that area. I got a code for the map with markers like i want it: <script src='https://maps.googleapis.com/maps/api/js?key=&sensor=false&extension=.js'></script> <script> google.maps.event.addDomListener(window, 'load', init); var map; function init() { var mapOptions = { center: