KML file of a area in GoogleMaps - google-maps

I'm developing an application where I need the boundary of an area of google maps or earth in KML or Shape file. I need the co-ordinate of the polygon. How can I get this? Does any other platform like open street map has this kind of feature? I want co-ordinates like following
<coordinates> -112.3348783983763,36.1514008468736,100
-112.3372535345629,36.14888517553886,100
-112.3356068927954,36.14781612679284,100
-112.3350034807972,36.14846469024177,100
-112.3358353861232,36.1489624162954,100
-112.3345888301373,36.15026229372507,100
-112.3337937856278,36.14978096026463,100
-112.3331798208424,36.1504472788618,100
-112.3348783983763,36.1514008468736,100 </coordinates>

There is already a feature request filed in Google's Public Issue Tracker for polygon generation in a specified geographic boundary. You can check it here: https://issuetracker.google.com/issues/35816953
To express your interest, I suggest that you star the issue to get updates and leave comments for additional information.

Related

Google Maps: Draw polygon surrounding random locations

I have a set of random locations. The location set will keep changing. I would like to draw a polygon surrounding these locations.
Can this be done in Google Maps and how? The map will be displayed on a website only, no mobile api required.
It's called a convex hull. Here:
http://www.geocodezip.com/v3_map-markers_convexhull.asp
I would cite the code but it belongs to #geocodezip who is the authority on google maps and runs an excellent site of examples. I suggest you check it out.

Google Maps - Scraping KML / extract overlays data ( coordinates )

I would like to understand how to scrape / extract KML data from a google map overlay.
I have been trying for last few month without success. I did try using fiddler and my console developer tools to look into the site's source code.
I went through almost every line of Javascript and I still cannot figure out how to intercept the KML data or extract it from these maps (see below).
Target Maps
Here is an Overlay that consists of one Satellite footprint.
and Here you can find much more examples of similar maps.
I am not even sure if this is possible and how it can be achieved.
Has anyone been able to do a similar task ? Please I need guidance on how to achieve this.
Thank you for your time.
I take a look and tn the overlay there aren't data to scrap...
For the KML is simple you can do it server side. opend then kml like an xml file and the scan this dom for placemark, polygon and lineaRing tag inside you find the coordinates in lng, lat format..
Client side you can do this whit jquery loading the xml file and scan for node you need ...
The kml struct is standard...
<Document>
<Folder>
<name>Full Satellite Footprint - EIRP</name>
<Placemark>
<name>Atlantic Ocean EIRP 40dBW</name>
<styleUrl>https://www.telesat.com/kml/TelesatKMLStyles.kml#coverageArea</styleUrl>
<Polygon>
<outerBoundaryIs>
<LinearRing>
<coordinates>36.826,55.201,0 37.0055090185901,55.2151134621769,0 36.8423211206917,55.6055987892911,0 36.5363438121321,56.3253739818074,0 36.2041398771245,57.1121727752464,0 35.6982976142624,58.2038341375218,0 35.4781980136987,58.66035224623429,0 35.2392363744069,59.1245171274041,0 34.991585220959,59.5937508918316,0 34.7381410580738,60.0586398991811,0 34.4948230756851,60.5170059779041,0 34.2134913653683,60.9937069314964,0 33.9399744247826,61.4547783456267,0 33.6430131750038
You can use pjscrape..
It has a cool WebKit engine which can run the Javascript and render the page. Maybe that's the thing you're asking.

How to retrieve a static map showing city or municipality boundaries

I'm not sure where to start looking in the documentation, but I'm trying to load map images of cities with their boundaries outlined.
Like this...
Any help getting started would be greatly appreciated, I'm pretty new to the maps api.
Thanks
There is currently no way to request a map with boundaries automatically rendered on it. Your best bet is to pull the polygon information from another system and render using an encoded polyline if you're using the Static Map API or regular overlays in the JavaScript API.
Google Static Map API
Here it is
here, some links to help you:
Geographical boundaries of states/provinces -> Google Maps Polygon
EInsert extension
Boundary Draw - Google Map Application
Getting neighbourhood boundaries from Google Maps API
https://stackoverflow.com/questions/8441467/can-you-draw-custom-search-boundaries-in-google-map
Ability to draw boundaries on Google Maps

JavaME LWUIT: is there appropriate map lib?

I am developing JavaME LWUIT application which needs to display some data on map.
And I'd like to use Google Maps for this.
I thought about the requirements to the maps and their user interface. They are
listed below:
Pannable map. It should be possible to scroll the map using the touch interface or navigation arrow buttions which are displayed on the map.
Zoomable map. At the best, there should be appropriate +/- buttons displayed on the map.
Search location by address and move to it (menu command).
Remember the last visited location.
Marker for the current location.
Markers with customable icon and text which is displayed when select the marker (click on it or select somehow).
I spent some time searching for appropriate Map Library for JavaME/LWUIT.
I expected to find a free library and map service (ha-ha).
See my results below:
MIDMaps library. URL: http://www.jappit.com/blog/midmaps-google-maps-java-me-library/
That library uses the Google Static Map Service. Not bad... but it needs a lot further improvements...
I found the follwoing issues with that library:
Markers: impossible to customize marker's icon and text. Displaying the marker's text on click/selection is not supported.
Map Panning: no UI controls for this (arrow buttons). Doing panning with menu commands is not a user-friendly.
Map Zooming: no UI controls for this (+/- buttons). Not so important...
License: not permitted to use in a mobile app if not a Google Premier User. Not a problem...
Nokia Maps API for JavaME. URL: http://www.developer.nokia.com/Develop/Maps/Maps_API_for_Java_ME/
Did not try. But looks like that lib fulfills all my requirements.
I am not sure about the following things:
Quality of the maps.
How much does it cost? I mean the cost of using the map service.
Nutiteq lib which uses OpenStreetMap service. URL: http://www.nutiteq.com/map-api
Not free the lib, but the map service.
Guidebee Map API. URL: http://www.guidebee.biz/
It's not free.
Now it's a time for me to ask questions. What should I do? Are there any advices?
Maybe I missed some possibilities or lib/services?
Thank you for your help!
See the Makeover demo in SVN (I updated it to use Google maps instead of Yahoo maps API which was killed off). The GoogleService API should be available in the SVN history it was (deleted because of licensing nonsense) within the IO services directory and it includes local search etc.
Terrence has a a demo that includes allot of interesting features including a browseable map.
You can also look at Waze although I haven't checked it myself, I saw people using open street map and AFAIK there is an open source mapping application based on that (although the license might not be appropriate for you but it might still be useful as a learning aid).
After some additional investigations I decided to use Nokia Maps. And now I have a working application which displays interactive map with my data markers on it and also my current location.
I chose Nokia Maps API because it provided real dynamic maps (panning, zooming, tiling) and fulfilled all my requirements, except "Remember the last visited location" (can be implemented on my own).
I met the following problems:
Using the maps from LWUIT, not from an ordinary MIDP application. I used the approach shown here Nutiteq SDK with LWUIT and also implemented my own MapWidget class for LWUIT.
Displaying additional info on marker click. There is no support for this in the lib. I had to implement it on my own. Details are here JavaME Nokia Maps API: how to display additional info on marker click
Additional info related to the choosing proper map library can be found here Discussion on Nokia Forum

Google Maps - Online Map Marker to mark polygons and shapes onto the map

I'm looking looking for a tool that will allow me to make a map exactly like this:
http://datasearch.uts.edu.au/about/mapsdirections/map.cfm
Basically I need to put shapes around buildings in the satellite view and then slap a marker and information window on them so that I can specify the building name and contents.
So the main issue is that I need the ability to draw shapes directly onto the maps as I don't fancy taking down the lat lng of each corner of the polygon.
Ideally what I'd like to do is have an online application that exports those points to KML, and then I would display google maps on my site and import that kml to display it.
Other suggestions welcome!
Jason
Found a polygon creator
http://www.the-di-lab.com/polygon/
It's simple to use and allows you to copy and paste straight into your code. Would be nice if it had a button that said sent to kml though..