google-maps-api-3

Including <script> elements in a custom infowindow

元气小坏坏 提交于 2019-12-23 05:31:48
问题 I am using the Google Maps API to create a custom InfoWindow that contains fusion table content. I also want to embed content from an external site in the InfoWindow, but cannot get the code to work. The embed code from the external site is: <link type="text/css" rel="stylesheet" media="all" href="http://www.foodsecurityportal.org/sites/all/modules/tic_countries/tic_countries_widget.css" /> <div class="web-widgets-inline" id="web_widgets_inline_country_news_36"> <script src="http://www

Phonegap not firing GoogleMaps v3 domListener function inside Angularjs directive

a 夏天 提交于 2019-12-23 05:27:53
问题 I've got a directive in one of my templates, the following is the code of that directive: appDirectives.directive('map', function() { return { restrict: 'E', scope: { onCreate: '&' }, link: function ($scope, $element, $attr) { alert("This fires just fine."); function initialize() { alert("This doesnt fire on Phonegap."); navigator.geolocation.getCurrentPosition(function (pos) { $scope.currentLocation = new google.maps.LatLng(pos.coords.latitude, pos.coords.longitude); var mapOptions = {

Change marker icon options in google maps

百般思念 提交于 2019-12-23 05:26:33
问题 I use this code to create my markers (TypeScript btw) The options for the icon allows me to rotate and set a fill color of the marker. But how can I change the fill color and rotation after creation? I have found various responses here on SO, but they refer to changing the icon to a bitmap and swap between red and green bitmaps for example. Which is not what I want. var icon = { path: google.maps.SymbolPath.FORWARD_CLOSED_ARROW, scale: 4, fillColor: "#ff5050", //<-- I want to change this

Display multiple routes between two points on Google Maps

冷暖自知 提交于 2019-12-23 05:19:49
问题 I want to display multiple routes between two locations on google maps. result contains 3 DirectionsRoutes. directionsRenderer1.setDirections(result) displays the first route. console prints routeindex1 = 0. At line 15, console prints routeindex2 = 1. However, at line 16, directionsRenderer2.setDirections(result) displays the identical route on top of the first route. At Line 17, console prints routeindex2 = 0. How do I display the other route? function renderDirections(result,map) {

Google Maps API v3 with custom map image - markers repeating horizontally [closed]

佐手、 提交于 2019-12-23 05:19:28
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . I have custom map image tiles in use with Google Maps API v3. When I place a marker on the map, the marker repeats horizontally as if the map repeated as well. Here is an image of what is happening: http://puu.sh/vN7b How can this be fixed? I don't want to limit the map bounds to fix this. 回答1: Two things: 1/ In

Google map to show name of location if found, otherwise just the address

南笙酒味 提交于 2019-12-23 05:15:34
问题 Can I use embedded Google map in my website to show the name of location if found, and if not found then just the address? I can get my code to show the address in all cases but the name is showing up only in some cases. I have a few examples in http://www.yankeedesi.com/testmap.htm. If you look at the first row, I can get the map working with address but not with name of the place. In the second row, however both the cases are working. The code I used for the first one is: <iframe width="300

Google Maps V3 - Resizing Map and Sporadic Map Tile Loading

佐手、 提交于 2019-12-23 05:05:36
问题 I'm using Google Maps and the JqueryUI Resizable() method (from JqueryUI 1.8.7). If you click on the bottom-right corner of this map then you can drag and expand it. http://www.energyjustice.net/t=eb5f7o However if you make it wider Google only provides map layers up to around 800 pixels wide. It has a similar problem if you make it taller. If you wait a couple minutes, sometimes the full set of tiles will load. In general when you expand the map it behaves very strangely. It seems to work

Convert lat long string into google maps API LatLng Object

▼魔方 西西 提交于 2019-12-23 05:04:17
问题 I am trying to convert a lat long string (53.3603, -6.315050000000042) into a google maps object in this format: B: -6.26747649999993 k: 53.339251 I have used this function which works for the long but returns Nan for the lat. function getLatLngFromString(ll) { var lat = ll.replace(/\s*\,.*/, ''); // first 123 var lng = ll.replace(/.*,\s*/, ''); // second ,456 var locate = new google.maps.LatLng(parseFloat(lat), parseFloat(lng)); return locate; } ; I am storing the lat long in a html tag as

Convert lat long string into google maps API LatLng Object

余生长醉 提交于 2019-12-23 05:03:46
问题 I am trying to convert a lat long string (53.3603, -6.315050000000042) into a google maps object in this format: B: -6.26747649999993 k: 53.339251 I have used this function which works for the long but returns Nan for the lat. function getLatLngFromString(ll) { var lat = ll.replace(/\s*\,.*/, ''); // first 123 var lng = ll.replace(/.*,\s*/, ''); // second ,456 var locate = new google.maps.LatLng(parseFloat(lat), parseFloat(lng)); return locate; } ; I am storing the lat long in a html tag as

Why MissingKeyMapError using tag p:gmap with primefaces (in the simplest example)?

痞子三分冷 提交于 2019-12-23 05:03:40
问题 I have read that, since Google Maps V3, developers do not need any api key in order to use google map api. My code is the following (the simplest one to visualize a google map). I have tried to run it both on google chrome and on firefox, but in both of them, the map popped up a few seconds and then the app raised this exception: js?sensor=false:32 Google Maps API error: MissingKeyMapError https://developers.google.com/maps/documentation/javascript/error-messages#missing-key-map-error_.ab @