How to combine table/chart with (Google) Maps (stats) - google-maps

I want to use Google Maps or another Map like Openstreetmap to make an interactive site where people can see the stats of crime in their own area... I want to put in these stats by myself via the backend. The front-end must be something like this:
http://www.police.act.gov.au/crime-and-safety/crime-statistics.aspx
Where do I start with this? Is this a polygon? I have read the Google Maps API but I could not find a clue to make something like this. How did they put the stats in it? How can I color the area's and divide them? What did they use? Any direction would be very welcome.
PS: I want to have a detailed map. So no countries or cities, but the area's in a certain city have to be highlighted.

What I can suggest is that first study the developer documentation thoroughly for Google API v3.Basics will help a lot.
For pointers to your needs, you can get help in defining polygons and coloring them at this link https://developers.google.com/maps/documentation/javascript/overlays#Polygons and also check out the demo examples in the code.
For a 3 point polygon, here is an example https://google-developers.appspot.com/maps/documentation/javascript/examples/polygon-simple
You can define your polygons by adding points around your area. There are many tools available to find your pointer locations like http://martinove.dk/maptools/polytool/
In order to potray data, you can use markerclusterer. These examples can help:
http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclusterer/examples/

Related

How to get an area of interest image given latitude and longitude arcGIS?

I would like to know if it's possible to give a latitude and longitude (or bounding box)for a certain location return back an area of interest image, including a target property and a list of nearby schools in arcGIS?
Me and my manager went through the Esri docs but couldn't find a way of doing it. If not, any suggestion for a different api to do that?
I would like to get something like this image below where the red point of interest is a property and the black ones are nearby schools:
p.s: I'm using the esri rest api.
cheers for the help!
As nobody helped me and somebody may have the same situation as me. I was able to solve the problem using the ExportWebMap from esri, basically accessing the their printing service. In case somebody needs it, here's the specification.
https://developers.arcgis.com/rest/services-reference/exportwebmap-specification.htm

Accessing google maps area coordinates (suburb boundaries)

I'm trying to show some data about Australian suburbs. 'Suburb' is the term that Australians use to describe an area, if you are from the rest of the world think post code or something similar.
I'd like to be able to get access to the area boundaries that are already in the map. These are examples of the kind of boundary that I'm talking about:
Marrickville, Sydney (2204): http://goo.gl/maps/QYRhx
Clapton, London (E5): http://goo.gl/maps/3an2Y
I want to be able to draw the boundary on the map, draw multiple boundaries on a map (e.g. show which areas make up the 'inner west'), shade the areas to indicate their vaue of something or other. Generally do stuff with them.
This question asks about how to get boundaries that are drawn manually, but I want to access the ones that already exist.
This question asks a similar question, but it isn't answered.
This question is similar, but the responses suggest using shape files, not getting them directly from Google.
I've also tried the maps styling wizard, and whilst the administrative, neighborhood boundary is what I need to show, it doesn't seem to be able to affect the map.
I've looked in the api docs to no avail. Does anyone know if this is possible?
No, it isn't possible.
The area boundaries feature is not (yet?) implemented in the API.
If you explicitly need data from Google then I can't help you.
But if you just need data on Australian suburbs and don't care where you get it from (and if you happen to be interested in SA or NSW) then you can get GeoJSON or KML for SA from data.sa.gov.au/data/dataset/suburb-boundaries and for NSW from data.gov.au/dataset/nsw-suburb-locality-boundaries-psma-administrative-boundaries.
You might find others at data.gov.au/dataset too, I haven't searched that much.

How do I obtain the coordinates along GMaps directions?

I want to create an online map for a hiking trail, and I have been using my smartphone to collect coordinates from it.
I have many questions regarding what's good practice when it comes to making such tracks, but for starters: it would look much neater if I could edit the readings so that they are right on top any roads in Google Maps. How can I achieve this?
EDIT: I want to find the coordinates that will make a track along a road look exactly as if I'm using snapping/directions even when I'm not.
I've tried tools such as QLandkarte GT and Viking, and with the latter I was able to manually remove excess coordinates and move the remaining ones so that they're exactly on top of roads (inside Viking, using OpenStreetMap). However when I load the edited .kml-file in Google Maps, the roads seem to be in slightly different places and the result is hardly better than before editing.
I tried using the hack that exports GMaps directions as .gpx, thinking I could insert Google's own coordinates along the roads. But the exported file only had coordinates at the turning points with straight lines between these.
QLandkarte GT supposedly has a snap-to-road feature (see answer in link), but I haven't found it and I also don't know how to obtain a vector map of the area.
Then there's Google Earth which people seem to use for this, but again I can't find any track editing features (in the free version).
In short:
How do I edit my existing tracks so that they match roads in GMaps...
OR
How can I obtain new tracks representing roads in GMaps...
...so that the resulting track is as smooth as Google's own directions or other professional GPS-data, when displayed in GMaps?
It seems like it's possible to get these coordinates from Google Maps after all, exporting the directions polyline. I'm not sure how, it seems to involve adding the parameter output=dragdir to the link.
Anyway there's a tool called GPS Visualizer that can create a .kml-file with the wanted coordinates.
Edit: Will accept my own answer as long as it's the only one, but I would still like to know more.

Google Maps - Grid based clustering

on this page https://developers.google.com/maps/articles/toomanymarkers
it says how this is the easiest clustering posible, but I can't find any client side solution for this. Does anyone know for free open source, client side solution of grid based clustering for google maps markers ? i don't want MarkerClusterer.
I didn't find it, so i went and start coding my own solution. The first obvious request is that it has to be fast for up to at least 1000 markers loaded on map. Every zoom in out, move and soo on, will repeat procedure/function of clustering. Grid blocks are customizable, default value is 50*50 pixels.
Image below is showing what should the result look like.
I'm having problem with algoritem, now all I can think of to achive this is to itterate through all markers for each grid and ask if it is inside bounderies and then increase array of grid ++. This obviusly can't be done that way. There should be some hash or something that just one itteration through all markers would be needed and I would know in which grid specific marker belongs to.
I hope someone will give me a hint for algoritem I'm after. Thank you !
Seems like geohash is the answer to your problem, you even allude to that solution in your question. It's explained well here:
http://blog.trifork.com/2013/08/01/server-side-clustering-of-geo-points-on-a-map-using-elasticsearch/
I am actually exploring developing a similar clustering algo for Google Maps API v3. I'll post more if I actually get anywhere with it.
You can use a geohash or a space filling curve to reduce the dimension and reorder and hash a marker. On the server side you can use a point and a spatial index data stucture but you can also compute the geohash manually. Look for xkcd internet map comic and the hilbert curve to see how it works.

Easiest way to create a dynamic heatmap of the United States

thanks for all the help the last few days. I'm hoping someone knows this one.
I'm looking to dynamically create a heatmap of data based on user input, then color certain states based on the response. Like a poll for voting, for example. I'd like to do something like this...
http://www.trulia.com/home_prices/
What is going to be the easiest way to do this?
The Google Chart API also offers maps.
Here's a (completely made up) example:
Another very easy solution is OpenHeatMap.com. They support pegging data to a variety of map shapes, including US states.
OpenLayers is a javascript library for displaying tiled maps and related elements (polygon, line, etc) on top of these tiles.
It supports a number of back-ends for map data, including google's data.
Samples are available here