Google Maps information

1

I would like to know the following ... I have some map images, which indicate a certain coverage, I would like to add these images over google maps ... I believe this is not difficult ... The big problem that I see, these images have a density.

The darker the purple, say, homicide rate - ex: 100, hence the lighter, Homicide - ex: 10 ... and so on.

So, I do not know how it's done in google maps. Imagine clicking on the map will have to inform me of the data.

As this is done in google maps, do I add the image, or do I have to create it with google maps API? Do you have any examples?

    
asked by anonymous 14.04.2015 / 03:18

2 answers

1

Ideally you should use features from Google Maps itself and draw regions instead of putting an image in.

I've created in the JSFiddle an example .

Basically you define the coordinates of the region to be drawn.

Example of important part:

var homicidioCoords = [
    new google.maps.LatLng(-9.86062814536589, -50.25146484375),
    new google.maps.LatLng(-9.384032109601689, -56.75537109375),
    new google.maps.LatLng(-12.876069959946493, -57.041015625),
    new google.maps.LatLng(-14.477234210156507, -54.0087890625),
    new google.maps.LatLng(-13.26133317079826, -50.64697265625),
    new google.maps.LatLng(-9.86062814536589, -50.25146484375),
];

// Constrói o desenho.
areaAfetada = new google.maps.Polygon({
    paths: homicidioCoords,
    strokeColor: '#FF0000',
    strokeOpacity: 0.8,
    strokeWeight: 2,
    fillColor: '#FF0000',
    fillOpacity: 0.35
});

The output:

Withthisyoucangocreatingtheregionsandinsertingthecolorsasyouwish.Ialsoputaneventtorightclicktoshowthelatitudeandlongitudeoftheplace.Thebestwaywouldstillbeforyoutoperformtheentiredrawingonthemap,andsavethecoordinates.

AsIsaid,theexampleisin JSFiddle an example . References: polygon-simple

    
14.04.2015 / 06:28
0

My suggestion create caches of images using Map- lerer and then use the overlaying an image map type of the Google Maps API itself

link

Post your questions also in the Google Maps API community link

    
15.04.2015 / 18:28