google-maps-api-3

Multiple polylines overlapped on Google Maps

孤街醉人 提交于 2019-12-23 04:20:23
问题 I need to show multiple flight routes on google map. I used polyline with geodesic for that and that is working fine but the problem is when more then two flights going through same route then polyline overlapped by another polyline. Can we solve this by changing curve angle or can we little bit separate from each other. 回答1: Now I am working on this url I think it will work and it is best way to solve this question problem: https://developers.google.com/maps/documentation/javascript/examples

Change point location of multiple custom marker icons Google Map API V3

ⅰ亾dé卋堺 提交于 2019-12-23 04:05:11
问题 I need to be able to change the point location of marker icons, where each marker location has a separate icon. The icons need to be centered on the anchor point, not bottom-center as they are default... I can't figure out how to do this without completely re-working my code... var sites = [ ['Photo 1', 36.33835943134047, -93.63535, 4, 'mylinkurl', 'images/marker1.png'], ['Photo 2', 36.315939, -94.440630, 2, 'mylinkurl', 'images/marker2.png'], ['Photo 3', 36.085890, -93.90175, 1, 'mylinkurl',

Google maps or Bing maps API?

柔情痞子 提交于 2019-12-23 04:03:39
问题 I'm trying to figure out what to use for my web application. I"m currently using Google maps api, however I have started looking at Bing maps api more. This application among other things, gives directions to where you have to go. The reason I'm thinking about going to Bing is that Google has gotten some addresses wrong (probably about 10%) and Bing has gotten 0 wrong so far. Does anyone know if one is more accurate than the other (other than me just performing my non scientific test on both)

Display Markers which are within the current view port in Google Maps v3 js api

♀尐吖头ヾ 提交于 2019-12-23 03:57:11
问题 The Scenario I have a few locations that I need to mark on the map. I can simply do this by marking everything at once, but since the number of locations that I need to mark will be huge, I want to handle it like this - When the users browse through the map, only the locations that are in the current view port will be Marked on the Map. Now, I can get the NE and SW bounds of the map using the getNorthEast() and getSouthWest() functions of the google.maps.LatLngBounds class. We can use the

Adding a div element inside a panel?

陌路散爱 提交于 2019-12-23 03:51:45
问题 I'm working with GWT and I'm trying to add google-maps to my website. Since I want to use google-maps V3 I'm using JSNI. In order to display the map in my website I need to create a div element with id="map" and get it in the initialization function of the map. I did so, and it worked out fine but its location on the webpage is funny and I want it to be attached to a panel I'm creating in my code. So my question is how can I do it? Can I create a div somehow with GWT inside a panel ? I've

How to add a random point inside a polygon in Google Maps?

霸气de小男生 提交于 2019-12-23 03:44:25
问题 I have a bounds to a place and created a polygon of that place. How can I generate a random point inside the bounds of that polygon? 回答1: One way of doing it. This will calculate the bounds of the polygon, then guess a random point inside that bounds, if the point is contained by the polygon, it will put a marker there. // calculate the bounds of the polygon var bounds = new google.maps.LatLngBounds(); for (var i=0; i < polygon.getPath().getLength(); i++) { bounds.extend(polygon.getPath()

google fusion table- not able to color the layer in map after 5 colors

谁说我不能喝 提交于 2019-12-23 03:39:12
问题 I am coloring country polygon with different colors in a layer depending on different condition. But after the five "where" conditions, it didnt detect the associated color. But uses the default color. Why is this happening? Below is my code: layer.setOptions({ query: { select: 'masterNarrative, countryName', from: tableId, where: where }, styles: [{ where: "masterNarrative= '72 virgins (houris)' ", polygonOptions: { fillColor: '#2daebf', fillOpacity: 0.5 } }, { where: "masterNarrative= 'Badr

google fusion table- not able to color the layer in map after 5 colors

删除回忆录丶 提交于 2019-12-23 03:39:05
问题 I am coloring country polygon with different colors in a layer depending on different condition. But after the five "where" conditions, it didnt detect the associated color. But uses the default color. Why is this happening? Below is my code: layer.setOptions({ query: { select: 'masterNarrative, countryName', from: tableId, where: where }, styles: [{ where: "masterNarrative= '72 virgins (houris)' ", polygonOptions: { fillColor: '#2daebf', fillOpacity: 0.5 } }, { where: "masterNarrative= 'Badr

Find nearest known location: Google Reverse Geocoding

折月煮酒 提交于 2019-12-23 03:34:08
问题 I am required to get the formatted address of a given coordinates using Google Maps API. I use the Google Reverse Geo coding for finding the location name. This works fine when there is a name available for the location in the Google maps database. Most of the times, the given coordinates are from a location far off from city boundaries (on a highway for example). The function returns ZERO_RESULTS as there is no name defined on the map. Requirement is to find the nearest known location

Google maps api not working properly

血红的双手。 提交于 2019-12-23 03:32:07
问题 So I'm playing around with this example and our company has its own API key for google maps. a co-worker and I tried to get the maps to work - Well in full screen the following code worked - by that I mean we just let the map scale the full width of the browser, the code we used is: <script> var map; function initialize() { var mapOptions = { zoom: 8, center: new google.maps.LatLng(-34.397, 150.644), mapTypeId: google.maps.MapTypeId.ROADMAP }; map = new google.maps.Map(document.getElementById