jvectormap

Is there a way to use “fill” AND “stroke” as attribute for regions scale colors?

天涯浪子 提交于 2019-12-11 02:06:00
问题 I'm using jVectorMap v1.1 and I've got this relevant piece of code: var america = "#d84148"; var europe = "#0060d0"; var africa = "#44984d"; var asia = "#e3a430"; var oceania = "#2ecdd0"; series: { regions: [{ values: data['colours'], scale: { "America" : america, "Europe" : europe, "Africa" : africa, "Asia" : asia, "Oceania" : oceania }, normalizeFunction: 'linear', attribute: 'fill' }] } The vector data I got is the world_mill_en from naturalearth.com and it contains a 1px separation for

Jvector map, how to focus on a marker?

不羁的心 提交于 2019-12-10 19:57:34
问题 Another frustrating issue I have with Jvectormap, I wish to focus on a Marker on page/map load via lngLat, how would I do this? Ideally it would be good to say focus on this marker or focus on latlng. I will only be displaying 1 marker per map but I won't know the x/y just the lngLat or possibly countrycode. There might be an easier way altogether to do this so suggestions would be welcome. Thanks for your help in advanced var markers = [ {latLng: [47.774099, -52.793427], name: "loc 1", label

Highlight country flag on blank world map when hovered on specific country

微笑、不失礼 提交于 2019-12-10 17:22:43
问题 I'm using jVectormap plugin for country highlighting on world map. Now As my question suggests i want to show country's flag when specific country is hovered over. I don't want to do image mapping for whole world map. so don't post that solution, i don't think its a feasible solution as i don't have such time to do that. if anybody has done this functionality using any plugin, svg, google maps, js anything please help me out. If any paid plugin is there even then i would like to know. I have

How to show tooltip only if a region is clicked in jVectorMap, and let it open?

这一生的挚爱 提交于 2019-12-10 14:53:00
问题 I'm using this jVectorMap. By default, it shows tooltip on hover. Here is what I'm trying to achieve - Show tooltip only on click (partially working but tooltip should be be above the mouse cursor. I couldn't figure out how to get mouse cursor position.) Let the tooltip opens until user explicitly clicks on close . Code: jsfiddle $('#map').vectorMap({ map: "us_aea_en", backgroundColor: "transparent", regionStyle: { initial: { fill: "#818486" } }, onRegionClick: function (e, code) { var map =

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

戏子无情 提交于 2019-12-10 10:36:17
问题 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

jVectorMap - Drill-down map - custom background

北城以北 提交于 2019-12-10 09:17:11
问题 I'm using drill-down map from jVectorMap and I'm trying to set custom background color to second layer of the map. To customize main level, I use "main" parameter, but I don't know how to expand this to lower levels of the map. Thanks in advance, Maciej 来源: https://stackoverflow.com/questions/31373458/jvectormap-drill-down-map-custom-background

jVectorMap error: “jvm is not defined”

亡梦爱人 提交于 2019-12-10 04:35:58
问题 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

Jvectormap very small on div change

烈酒焚心 提交于 2019-12-09 06:22:19
问题 I have two divs, one with the world map and one with the US map. When the USA is clicked on the world map I want to hide that div and bring the US map into view. This works but the map is tiny, even though the position of the zoom buttons indicates the size of the div is how it should be. Any ideas? If I have both divs set to "block" from the start they are both the correct size, it's only when invoking code to switch the div that it fails. onRegionClick: function(event, code){ if (code ==

Different Colored Markers with JvectorMaps

房东的猫 提交于 2019-12-07 02:42:38
问题 With JVectorMap, How can I add two sets of markers that are different colors? There's been one other question asked about it and the solution didn't work on JSFiddle. Right now I have markers like and I can attribute types, but I don't know the code that would change the colors of specific types. Any help? <div id="map"></div> <script> $(function(){ $('#map').vectorMap({ map: 'us_aea_en', zoomOnScroll: true, hoverOpacity: 0.7, markerStyle: { initial: { fill: '#800000', stroke: '#383f47' } },

jvectormap region colors

不羁岁月 提交于 2019-12-07 01:27:44
问题 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',