I need to draw complex regional bounding polygons in google maps. Is there a way to easily access regional data to draw these polygons? The regions will be australian postcode areas. If you type a post code into google (not maps normal search) such as "2454" into google the first result is an image with the regional polygon (perhaps this search only works if your searching from australia). Im assuming this data is accessible as google is drawing the polygon.
any idea how i would access this bounds data?
an example of what im talking about is here
http://maps.google.com.au/maps?pq=australian+postcode+2454&hl=en&cp=0&gs_id=2&xhr=t&q=2454&safe=off&gs_upl=&bav=on.2,or.r_gc.r_pw.r_cp.,cf.osb&biw=1876&bih=872&um=1&ie=UTF-8&hq=&hnear=0x6b9e9f724b020f8d:0x1c0609b7ccd310d0,New+South+Wales+2454&gl=au&ei=a3MoT66iKoKuiQelk7m3Ag&sa=X&oi=geocode_result&ct=title&resnum=2&sqi=2&ved=0CDIQ8gEwAQ
This data isn't available through the Google Maps API at this time. You would need to find a 3rd party provider of the boundary data. A quick query shows several providers of the data, though I'm not sure if they're provided anywhere for free. Once you get the data, it's probably in a GIS data format, such as a Shapefile or a KML file. These can be loaded into Google Fusion Tables or KML files can be loaded directly using a Google Maps API KMLLayer.
That data is not accessible programmatically from Google. Your best bet is to either find KML for the data and then use either maps.google.com or the Google Maps API to load the KML (http://code.google.com/apis/maps/documentation/javascript/layers.html#KMLLayers) or to use somehing like Fusion Tables to load GIS data (or KML) into a fusion table, and then use the Fusion Tables layer in the Google Maps API (http://code.google.com/apis/maps/documentation/javascript/layers.html#FusionTables).
*Note that the Fusion Tables layer is experimental.
Related
I am trying to create a website that display Google map mark up with my proprietary data (in form of multiple polygons) on top of it.
I have been studying Google Map API and found the only way to do it is to publish my proprietary data in GeoJSON file then use the following api function to load the data to Google map: map.data.loadGeoJson(xxxxxx);
This means I need to publish my proprietary data by web service in GeoJSON format. However, I don't want users to download my proprietary data and use it for another purpose other than my site. This is similar to a website which allows video streaming but not allowing download the whole video offline.
How can I achieve the purpose? Can I use some language like PHP to generate the map (with markup) at server then send to web client in form of HTML? Or if I cannot achieve this by Google Map API, can other map API support it (like Bing?)
Thanks very much for your help!!!!
Code Mon key
One option is to turn your data into a tile layer. This will limit the user to only seeing an image of the data but would not give them access to the raw data. In a worse case scenario they would only be able to take the images and view the data and not do any kind of analytics against it unless they manually trace all the data.
As an added benefit of rendering the data as a tile layer, you will be able to visualize a lot more data. I've built a few systems that can render 500M rows of polygon data on a map using this approach. The cool thing, if you store the data in a spatial database like SQL Azure, you can easily make your data interactive by taking the point a user clicks on a map and searching the database for any shapes that intersect with that point.
I wrote a simple blog post on how to create a web service that does this many years ago here: https://rbrundritt.wordpress.com/2009/11/26/dynamic-tile-layers-in-the-bing-maps-silverlight-control/
There is also a good open source project here that uses ASP.NET: http://ajaxmapdataconnector.codeplex.com/
I have a whitepaper that is a lot more up to date than my blog post that will be published soon. If you email me at ricky_brundritt at Hotmail.com, I'll send you a draft copy.
I have a database with lat\long values and I use google maps api v3 to plot these points on a map and draw a 30 mile radius around these points. All I have is a bunch of circles drawn on the map with info windows if you click on these circles.
I need to export this map as a .kmz file so that I can put it on my web server and make it available to our marketing website to import as a layer into their site.
Is this possible without re-inventing the wheel? My initial map is drawn in php, I query the database and get a json object that I traverse in javascript to plot the points and draw the circles.
Thank you
Jack
My current map as it appears:
I am looking for cross-platform data visualization solution.
It should ideally work in web browsers and by extension on Android and iOS devices.
To go into more detail, I'd like for the server side to be able to accept data via HTTP POSTs (XML, JSON, etc), and then allow for themeable output of these data via widgets (Drupal-like) such as meters, graphs, plain text etc.
The data types should be configurable and easily created/modified.
Here is a quick example:
I want to show temperature from a bunch of sensors as a graph. The sensors can POST the data to a main server and the server can then be called from a browser to display a chewed-up and configurable graph.
Thanks for your input guys!
A little searching on google would yield a lot of libraries, My favorite being a html5 one called Rgraph http://www.rgraph.net/
High charts is another excellent solution. http://www.highcharts.com/
These are both html5 based.
You can check the combination of google spreadsheet for the DB/backend and Google Visualization for the frontend visualization.
Google GData API has a nice set of client libraries that make writing POST data into Google Spraedsheet a very simple task. Check out: http://code.google.com/apis/spreadsheets/data/3.0/developers_guide.html#CreatingListRows
ListEntry newEntry = new ListEntry();
newEntry.getCustomElements().setValueLocal(tag, value);
ListEntry insertedRow = service.insert(listFeedUrl, newEntry);
On the other end, It is rather easy to use the JavaScript libraries of Google Visualization to extract and present data from a published spreadsheet. It has a wide range of widgets ready to use. If you are missing any specific widget, you can use any JS library with some manipulation of the JSON data.
For simple example on the ability to turn a Google Spreadsheet to a live chart check: http://code.google.com/apis/chart/interactive/docs/spreadsheets.html#Google_Spreadsheets_as_a_Data_Source
I'm looking for a quick way to drop in a map for something like Minecraft into a pan/zoomable thing, with support for custom coordinates (like defining where is 0,0 or something)
Can't seem to figure this out with google maps, any ideas? I have tile pngs for multiple zoomlevels, I have coordinates, just no clue how to implement it.
There are several ways to get the look and feel of a map.
One huge graphic
In case you've got only one huge picture of the map that is maybe even over 100 MB in size, use the service Zoom.it. Although it's supported by Microsoft and therefore uses Silverlight (JavaScript support available as well, though), it's a handy service. Besides, the homepage also stores the automatically generated tiles and hence serves as a webhoster as well.
Several tiles at different zoom levels
In this case it's probably best to use the Google Maps JavaScript API V3. It helps you realise all your map plans. In your case you'd have to overlay your map on the real world map. To be honest, that does sound weird as all coordinates on your specific map are also related to a region on the map of our beloved planet Earth. However, it works like a charm. Should you need webspace to upload your huge map in advance, use a service like Wuala for this purpose.
All-in-one Map Generator
As you want to create a map of your Minecraft world, it's maybe best to directly use Tectonicus, a deep map renderer that also creates all required HTML pages to render your map using the Google Maps API. You can find an example map here.
Is there somewhere a base of polylines for download, I need polylines of european countries and a solution in php for calculating in which country a certain coordinate resides.
I used google maps api for this till now but it's too slow and I make many requests frequently so I need to do this locally.
Using the Google Maps API is a good solution because the data is already there and you have the code to use it.
However, a local solution would be to setup a spatial database and load it with the appropriate data. For an open source solution I recommend PostGIS running on PostgreSQL. You then need to find and load in the relevant boundary data. Searching for "world political boundary shapefile" or "europe political boundary shapefile" will give you some useful links to check.