I want to draw polygons in google maps and for these to be stored in mysql. I then want to be able to upload polylines and see if they intersect with the polygons. Is this possible?
I am not sure if you can do it with google maps, but you can use leaflet and openstreetmaps to develop it.
Using leaflet you can draw polygon and get that value in a textbox and save it in your database.
http://leafletjs.com/examples/quick-start.html
Try this example
https://github.com/Leaflet/Leaflet.draw
Related
I have a list of customer (GPS coordinates) for each salesman in excel file. I want to create a polygon in Google map that shows area of each salesman in map.
Is there any tool that shows my salesman area in the Google map ?
For the first step it is easier to use Google Earth.
To display data you need a google kml file.
Create a placemark, and use the Polygon.
More, see https://developers.google.com/kml/documentation/kml_tut
To display a kml in google maps, the file has to be located on a server reachable by an url.
Ffor goggle earth a local file on your disk is sufficient.
For this problem, you may want to use a concave hull algorithm. You can read more in depth at https://gis.stackexchange.com/questions/39205/converting-point-sets-to-polygon-boundaries
In JavaScript, you can use https://www.npmjs.com/package/concaveman.
I am playing around with the Google Maps JS API, Mapbox API and I was curious, how are markers actually added to a map? Does the backend code take a set of map tiles, convert the edges to lat/long, and then simply interpolate the lat/long of the marker coordinates along the X and Y axes?
I ask because I am building an application that would need 1000-5000 simultaneous markers, and want to build my own backend system as using the Google Fusion Tables API can get expensive.
how are markers actually added to a map
In the simplest implementation, markers are represented as GeoJSON or similar, and requested from the server, and then 'projected' into screen coordinates from lat/lon; see node-sphericalmercator for one example of that logic.
For the 'performant' case, like TileMill or Google's pre-rendering mode, markers are baked into raster tiles, PNG files, that show them and their locations, and you do magic like UTFGrid to do interaction.
Note that both of these are compromises: you can get speed, flexibility, and simplicity, but it's very hard to get all at the same time.
I know Google Maps API Terms of Service do not permit you to save their map data.
However OpenStreet does.
I want to use Google Maps API (ver 2) with the OpenStreet map layer and my own map layers - and have a button to export the map to an image.
How can I do this?
You can use a spatial index or a space-filling-curve to make your own map.
I want to develop a web-application using Google Earth in the browser.
I need to add a point feature, a polyline and a polygon.
The web-applicaton needs to display the features the same as the Google Earth desktop application.
I want to use the Google Maps Api and the Google Earth Api to deliver google earth in the browser.
How can I make this kind of application for myself, what is the best way for doing so?
You should look at the Google Earth Api documentation. http://code.google.com/apis/earth/documentation/reference/
Simple objects like points, polylines and polygons can be created via the api or loaded in Kml format. Take a look at the following documents.
Geometries and Overlays
http://code.google.com/apis/earth/documentation/geometries.html
Introduction to Kml
http://code.google.com/apis/earth/documentation/kml.html
From the sounds of it the KML approach might be the easiest thing - depending on the nature of the application. If you have some existing data in Google Earth, it would be easy to save this as a kml or kmz file and load it in to the Google Earth Api.
hi all
i want to ask about using j2me to program path navigation by using google earth map
i dont found the static map of my country and my city ( iraq - mosul ) so i ask can i take the image from google earth and make a placemarks and draw path between then , i hope i found the answer because i am student researcher to complete my research to get the master
thanks for help me .
hiba
Yes, you can do this in the Google Earth application freely, simply drop the placemarks where you want and draw any linestrings you require.
GE: http://www.google.co.uk/intl/en_uk/earth/index.html
You can save this data as a KML file that can be loaded into most GIS applications including Gooogle Earth and Maps. KML is just and XML file so you could always just put it together by hand in a text editor as well...
KML: http://code.google.com/apis/kml/documentation/
Failing that you could use either the Gooogle Maps or Google Earth api to create the data.
Maps: http://code.google.com/apis/maps/index.html
Earth: http://code.google.com/apis/earth/