Answer the question
In order to leave comments, you need to log in
Cards. Embedding on the site part of the map?
Is it possible to insert a part of the map on the site, limited by the border of any country?
For example, you need to insert a map of France on the site without the surrounding countries, but so that the functionality of the maps remains.
Answer the question
In order to leave comments, you need to log in
If it's not about google maps, then you can also take into account the jquery plugin: plugindetector.com/jvector-map
It is possible to paint over parts of the map in google maps, something like this code:
If necessary. you can use fillOpacity not to completely paint over, but only to darken a part.
Next, you need the borders of the country to create a landfill, I won’t say exactly where you can get them. For example, state boundaries are here www.google.com/fusiontables/DataSource?dsrcid=210217 , once on geocoding.cloudmade.com it was possible to get the boundaries of objects through their API, it definitely worked for cities, maybe it works for countries.
var regionCoords0 = [
new google.maps.LatLng(@point0.lat,@point0.lon),
new google.maps.LatLng(@point0.lat,@point0.lon),
new google.maps.LatLng(@point0.lat,@point0.lon),
....
];
regionPolyhon0 = new google.maps.Polygon({
paths: regionCoords0,
strokeColor: "rgb(60,60,15)",
strokeOpacity: 0.80,
strokeWeight: 2,
fillColor: "rgb(80,80,25)",
fillOpacity: 0.50
});
regionPolyhon0.setMap(map);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question