So I want the markers to get bigger after how much it is zoomed in. I guess I could figure out how to make the marker size depend on the zoom value, but I dont know how to obtain zoom value.
I have tried to find some documentation on this but it seems like there is none.
So i hope one of you intelligent people know :)
All help appreciated
edit:
So i make the map div:
<div id="world-map" style="vertical-align: middle; width: 100%; height: 460px;"></div>
To make the map script i have a php file that goes trough a folder finding other folders with corresponding place names and coordinate files inside(reason for this system is so i can print the pictures inside the folders when you press the marker you can see the pictures from the place)
The php script echoes this:
$(function(){
$("#world-map").vectorMap({
map: "world_mill",
scaleColors: ["#C8EEFF", "#0071A4"],
normalizeFunction: "polynomial",
zoomMax: 1000,
hoverOpacity: 0.7,
onMarkerClick: function(e, code){
var mapObj = $("#world-map").vectorMap("get", "mapObject");
var idx = code; // optional
var name = mapObj.markers[idx].config.name;
var latitude = mapObj.markers[idx].config.latLng[0];
var longitude = mapObj.markers[idx].config.latLng[1];
namePlace = name;
$.ajax({
url: "updatePlace.php",
type: "GET", // performing a POST request
data : {
data1 : name // will be accessible in $_POST["data1"]
},
dataType: "json",
success: function(data)
{
placesArray = data;
newPlace();
}
});
},
hoverColor: false,
markerStyle: {
initial: {
r: 2,
fill: "#188a9a",
stroke: "#383f47"
}
},
backgroundColor: "#383f47",
//this will be done for each folder
markers: [{latLng: [" . $long . ", " . $lati ."], name: '" . $placeFolder[$i] ."'}];
] });
});
The php echo is printed inside the html code by using cookies. Whatever i echo in the php will be the same as writing it in script inside the html file.