A
A
Alexander2012-01-31 13:23:11
OpenStreetMap
Alexander, 2012-01-31 13:23:11

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

5 answer(s)
A
Andrey, 2012-01-31
@shinyweb

See how it's done here: maps.forum.nu/gm_texas.html

D
digdream, 2012-02-01
@digdream

If it's not about google maps, then you can also take into account the jquery plugin: plugindetector.com/jvector-map

C
cat_crash, 2012-01-31
@cat_crash

If only to find a card "limited by the border of any country"

V
vart, 2012-01-31
@vart

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);

A
Alexander, 2012-02-01
@gdX

Thanks for answers.
As we start working on the project, we will try to implement all kinds of methods.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question