google-maps-api-3

plotting 100k latitude-longitude locations on map

人走茶凉 提交于 2020-01-06 17:56:10
问题 I have about 100k locations stored in a MySQL server. I want to plot this in a map, but when I export it to a .csv file and then convert to .kml file, the file size exceeds 20mb, whereas Google Map API has limits of 3mb for .kml file. The .csv file is about 2.5mb, but I cannot load .csv files into Google Map. Is there any way I can do load the locations to a map? 回答1: Use Google Fusion Tables - they support 100,000 points per layer and 5 layers in toto . They are lightning fast too as you

Parsing data onto google map

江枫思渺然 提交于 2020-01-06 15:00:13
问题 I am trying to parse the latitude and longitude from a json file onto Google map, as well as several other data into the information window. However i think might have screw up somewhere as when i tried to run the file, all i got was a blank screen. Can someone point out what i have done wrong. Any suggestion would be appreciated. I have made use of the earthquake data created by google as my reference point. > window.eqfeed_callback = function(results) { var bounds=new google.maps

QWebKit doesn't handle click and dblclick for Google Maps

耗尽温柔 提交于 2020-01-06 14:53:23
问题 I just copy/pasted this code from google maps API in a my index.html <!DOCTYPE html> <html> <head> <meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> <style type="text/css"> html { height: 100% } body { height: 100%; margin: 0; padding: 0 } #map_canvas { height: 100% } </style> <script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?key=MYKEY&sensor=false"> </script> <script type="text/javascript"> function initialize() { var mapOptions = { center: new

Adding marker google map using data in database

≯℡__Kan透↙ 提交于 2020-01-06 14:50:27
问题 I'm trying to adding marker to google map using data in database. My table is : CREATE TABLE `markers` ( `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY , `name` VARCHAR( 60 ) NOT NULL , `lat` FLOAT( 10, 6 ) NOT NULL , `lng` FLOAT( 10, 6 ) NOT NULL ) I want to add marker in the google map without using : final LatLng Hospital = new LatLng(21 , 57); Marker Hospital= googleMap.addMarker(new MarkerOptions().position(Hospital ).title("Hospital")); how to add markers for all the locations that are

Google Maps Custom HTML Marker and MarkerClustererPlus

五迷三道 提交于 2020-01-06 14:45:40
问题 I have a map with Custom HTML Markers and a MarkerClusterer, the clusterer works fine, but I want to filter markers by radius to a location, I am able to get the markers inside the given radius, however I am not able to hide the markers outside the given radius and show only the markers inside that radius from the MarkerClusterer. I am defining my custom marker like this: function CustomMarker(latlng, map, args) { this.latlng = latlng; this.args = args; this.setMap(map); this.map = map; }

google maps api : determine if point is inside shape

 ̄綄美尐妖づ 提交于 2020-01-06 13:52:16
问题 I have created a rectangle on the map along with a listener for bounds_changed . It calls a method to determine if a point is within the adjusted rectangle. However I'm getting the error Cannot read property 'getLength' of undefined when I change the size of the rectangle. This error is coming from the call to containsLocation . In my init: rectangle = new google.maps.Rectangle({ bounds: bounds, editable: true, draggable: true, geodesic: true, map: map }); google.maps.event.addListener

Google Maps JavaScript V3 Api place div on marker

微笑、不失礼 提交于 2020-01-06 12:50:27
问题 I find it strange that no one needed this before (I assume this, because I didn't find anything about this subject ...). Anyways, I want to put a div instead of a marker on a map. Is this possible? I did that before in Actionscript like this: markerOptions.icon = new customDisplayObject(); You were able to give some options to the marker and define a DisplayObject to it. So what I want now is that I can put: <div> <p>Some text.</p> </div> instead of a marker on the map. Thanks! 回答1: Your

Google Maps JavaScript V3 Api place div on marker

梦想与她 提交于 2020-01-06 12:50:23
问题 I find it strange that no one needed this before (I assume this, because I didn't find anything about this subject ...). Anyways, I want to put a div instead of a marker on a map. Is this possible? I did that before in Actionscript like this: markerOptions.icon = new customDisplayObject(); You were able to give some options to the marker and define a DisplayObject to it. So what I want now is that I can put: <div> <p>Some text.</p> </div> instead of a marker on the map. Thanks! 回答1: Your

Loading kml markers above polygon

坚强是说给别人听的谎言 提交于 2020-01-06 12:45:25
问题 I am working with a google map api 3, on my map i want to generate kml markers after polygons, but it is not working, my markers are generate before polygons so i am not able to click marker. 回答1: Native Google Maps Javascript API v3 polygons will always appear on top of KML layers. If you want to control the order, use a KmlLayer to display the polygon as well, add that layer first or control the order with the zIndex property of the KmlLayers. related question: https://stackoverflow.com

how to get the newly edited polygon coordinates in google map apiv3

若如初见. 提交于 2020-01-06 12:40:33
问题 i have created and edited polygon successfully and after drawing the polygon i am getting the coordinates of the polygon, what i am looking for is after editing the polygon i am not getting the new coordinates of the polygon(after drag end i am getting the coordinates, immediately the new coordinates should appear as when i draw the polygon happen). my java script: var map; var coords = []; var lats = []; var lngs = []; var myMarkers = []; var myPoly; function initialize() { var latlng = new