google-maps-api-3

Google Maps and GeoJSon: latitude and longitude conversion

自古美人都是妖i 提交于 2019-12-24 07:14:35
问题 I'm using Google Maps API to visualize some label on the map using google.maps.Polygon. I used this converter http://converter.mygeodata.eu/ to convert them in a GeoJSon format, but latitude and longitude coordinates where mistaken. They should be centered in Florence, Italy, but actually i get this: 1680508.8375 4847672.484 I tried tho divide them by 10000 and i got: 16.805088375 48.47672484 wich alow me to show some results, but that was not the results I was looking for (I get them

Google maps Info Window Overlay content just like that in maps.goole.com

大憨熊 提交于 2019-12-24 07:04:14
问题 I want have the info window content for a marker just a s below My code so far is loadEmbeddedMap : function() { var script = document.createElement("script"); script.type = "text/javascript"; script.src = "http://maps.google.com/maps/api/js?sensor=false&callback=initEmbeddedMap"; document.body.appendChild(script) }, initEmbeddedMap : function() { var myLatlng = new google.maps.LatLng(40, -80); var myOptions = { zoom: 8, center: myLatlng, mapTypeId: google.maps.MapTypeId.ROADMAP } map = new

how to reset value of steps in google maps v3 animation

做~自己de王妃 提交于 2019-12-24 06:48:33
问题 this is my example http://gidzior.net/map/v3_animate_marker_directions.html (i'm using placeholder in the input), core of GM code is from geocodezip.com, i develop the code with the great help of Andrew Leach 1500 meters in the animation before the destination is set to zoom could be seen to better reach this destination point, unfortunately, after zoom, animation is not smooth and therefore I set the "step" value to 15, how to reset this value after animation stops i set step = 15 - if (d

Creating a dynamic Polyline with Google Maps and C# .net

为君一笑 提交于 2019-12-24 06:46:06
问题 I want to pass values from the VIEWBAG as an array of LatLons from my Model in C#. I am not sure how to dynamically loop the Viewbag array and add these cordinates to my javascript array to pass to: // Create an instance of Google map var map = new GMap2(document.getElementById("map")); // Tell the map where to start map.setCenter(new GLatLng(59.3324, 17.8857), 9); // Create an array with points var points = [ new GLatLng(59.6919, 17.8582), new GLatLng(59.3030, 18.0395), new GLatLng(58.9789,

Google map getting “initMap is not a function” in chrome browser only

风格不统一 提交于 2019-12-24 06:37:43
问题 Google map getting "initMap is not a function" in chrome browser only. In other browsers (Firefox, IE, etc ) are working fine. I am using the Google MAP API for location search and autocomplete location. The similar question answers I had tried. (https://stackoverflow.com/questions/46319676/initmap-is-not-a-function-in-using-google-maps-api),(https://stackoverflow.com/questions/40448238/initmap-is-not-a-function) Not working yet in Chrome. Here is the code. <script>function initMap() { var

Google Maps from Firefox addon (without SDK)

只愿长相守 提交于 2019-12-24 06:35:37
问题 I need to add a map in my adddon and I know how to do what I need in a "common webpage", like I did here: http://jsfiddle.net/hCymP/6/ The problem is I really don't know how to to the same in a Firefox Addon. I tryed importing the scripts with LoadSubScript and also tryed adding a chrome html with the next line: <script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"></script> But nothing works. The best solution I found was to add part of the code in this file (the code of

Google Maps with Meteor not working

此生再无相见时 提交于 2019-12-24 05:58:15
问题 For my project i need google maps api. I just can serve the api via script tag, so i tried something like that. my html: <head> <title>app</title> <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"> </script> </head> <body> {{> hello}} </body> <template name="hello"> <div id="map-canvas"/> </template> my js: if (Meteor.isClient) { var mapOptions = { center: new google.maps.LatLng(-34.397, 150.644), zoom: 8, mapTypeId: google.maps.MapTypeId.ROADMAP }; var map

Getting proper map boundaries

谁都会走 提交于 2019-12-24 05:37:36
问题 I use the simple: var ne = gMap.getBounds().getNorthEast(),sw = gMap.getBounds().getSouthWest(); to get the lat long of the boundaries of a map It works fine when the map is like this: But when the map is like this: The North-East lat long comes as something like 63.821287740550275, -179.73632762500006 . Which creates a problem because this lat long is almost same as the South-West resulting in no-area between them. Is there a way to get the desired values, something like a maximum value if

ASP.NET MVC 2 and Google Maps Javascript API Version 3

限于喜欢 提交于 2019-12-24 05:17:10
问题 Somehow I cannot get a simple map to work in a ASP.NET MVC 2 application with Google Maps Javascript API V3. I have tried the following: Site.Master: Removed <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> Added <!DOCTYPE html> Added this in < head > <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> <script type="text/javascript" src="http://maps.google.com/maps/api/js

How to use google map waypoints for TRANSIT

假装没事ソ 提交于 2019-12-24 05:12:18
问题 I know that we are not allowed to use google map API waypoints for TRANSIT, are there any ways (possible) that we can work around this to have google map find a direction to multiple addresses in waypoints but for TRANSIT only? 回答1: From the documentation: As noted within the DirectionsRequest, you may also specify waypoints (of type DirectionsWaypoint) when calculating routes using the Directions service for walking, bicycling or driving directions. Waypoints are not available for transit