jvectormap

How to make the markers get bigger on zoom/getting current zoom value JVectorMap

此生再无相见时 提交于 2019-12-06 05:20:23
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

jvectormap markers label image

孤人 提交于 2019-12-06 05:15:07
问题 does anyone know how to add two different images to two different marker's labels? $('#map').vectorMap({ markerStyle: { initial: { fill: '#F8E23B', stroke: '#383f47' } }, backgroundColor: '#383f47', markers: [ {latLng: [46.90, 8.45], name: "Italy"}, {latLng: [26.02, 50.55], name: 'Bahrain'}, ], onMarkerLabelShow: function(event, label, code) { label.html("<img src=\"img/logo.png\"><br>"+ label.html()); } }); this displays the same image on both markers 回答1: You can add an extra property image

Switch maps in Jvectormap?

拟墨画扇 提交于 2019-12-06 04:22:34
I'm trying to switch between maps using Jvectormap. Currently I have two divs, one "world-map" and one "us-map". The US Map is hidden. When someone clicks on the USA on the world map the world map div closes and the US map opens, works nicely. On showing the US map I also reveal a button that is designed to take the user back to the world map. However, when this is clicked it shows TWO world maps. I'm sure I'm doing something fundamentally wrong but can' find any documentation on this. I would have thought this was a common thing to want to do. Any pointers would be great. DIVS and Back button

How to set background color for JVector Map?

强颜欢笑 提交于 2019-12-06 00:30:35
问题 I have the following code to initialize JVector map: map = new jvm.WorldMap({ map: 'us_aea_en', // backgroundColor: #FFFFFF, //Only this line does not work. container: $('#map'), series: { regions: [{ attribute: 'fill' }] } }); The above line: backgroundColor: #FFFFFF does not execute. I read the API documentation, it seems to have correct syntax. The code works perfect except for that line. How to set the background? Are there any other ways to set the background color? 回答1: Thanks to @Denis

jVectorMap error: “jvm is not defined”

谁都会走 提交于 2019-12-05 06:11:23
I'm trying to recreate the jVectorMap example visualization of US unemployment. I took the code straight from github . The map, won't load and the console gives me this error: "jvm is not defined." Here's the code: <!DOCTYPE html> <html> <head> <meta charset="utf-8"/> <title>Maps</title> <link rel="stylesheet" media="all" href="../jvectormap/jquery-jvectormap.css"/> <link rel="stylesheet" media="all" href="css/jquery-ui-1.8.21.custom.css"/> <script src="../jvectormap/tests/assets/jquery-1.8.2.js"></script> <script src="../jquery-jvectormap.js"></script> <script src="../jvectormap/tests/assets

jvectormap region colors

一个人想着一个人 提交于 2019-12-05 05:49:19
Im using the jvectormap plugin , and I am trying to set the colors of each of the regions on the map. However, after applying the code below the map is displayed but with no colours applied. It just shows the map in white. I have read multiple examples and questions on this matter, but I cant seem to get it to work for me. Example 1 of setting random colours on a map. Documentation Similar question to mine, however it doesn't solve my problem. jQuery('#mapDiv').vectorMap({ map: 'au_merc_en', backgroundColor: 'none', colors: { AU-SA: '#4E7387', AU-WA:'#333333', AU-VIC:'#89AFBF', AU-TAS:'#817F8E

jvectormap markers label image

泪湿孤枕 提交于 2019-12-04 11:01:05
does anyone know how to add two different images to two different marker's labels? $('#map').vectorMap({ markerStyle: { initial: { fill: '#F8E23B', stroke: '#383f47' } }, backgroundColor: '#383f47', markers: [ {latLng: [46.90, 8.45], name: "Italy"}, {latLng: [26.02, 50.55], name: 'Bahrain'}, ], onMarkerLabelShow: function(event, label, code) { label.html("<img src=\"img/logo.png\"><br>"+ label.html()); } }); this displays the same image on both markers You can add an extra property image for each marker that you can retrieve when hovering a marker. var markers = [ { latLng: [46.90, 8.45], name

How to set background color for JVector Map?

ぃ、小莉子 提交于 2019-12-04 06:35:06
I have the following code to initialize JVector map: map = new jvm.WorldMap({ map: 'us_aea_en', // backgroundColor: #FFFFFF, //Only this line does not work. container: $('#map'), series: { regions: [{ attribute: 'fill' }] } }); The above line: backgroundColor: #FFFFFF does not execute. I read the API documentation, it seems to have correct syntax. The code works perfect except for that line. How to set the background? Are there any other ways to set the background color? Thanks to @Denis Malinovsky, I finally figured out that The answer is: backgroundColor: "#FFFFFF" GaryLeoNool You can also

How to show marker labels permanently?

梦想的初衷 提交于 2019-12-04 06:00:15
问题 In jVectorMap, I tried to find a solution to show the marker labels permanently, but I couldn't make it. I also didn't find anything about it in the documentation. I just want the marker labels initially shown. Any suggestions? 回答1: There isn't a quick or simple one. The way jVectorMap displays labels is by using a div and a label property/object for the map object, which changes its position and text. If you want static permanent labels you'll have to construct and position and show them

jvectormaps in dropdown menu, NS_ERROR_FAILURE:

守給你的承諾、 提交于 2019-12-04 02:31:01
问题 my jvector maps are in a dropdown menu, it works well in safari, opera and chrome but breaks (no map and error message NS_ERROR_FAILURE: (line 700 in 2.0.2.min.js "return this.node.getBBox();" in firefox, I've tried lots of different things but no luck. these are in the head. <script type="text/javascript" src="jVectormap/jquery-jvectormap-2.0.2.min.js"></script> <script type="text/javascript" src="../maCountries/be_coord.js"></script> <script type="text/javascript" src="../maCountries/be_map