Menu
  • HOME
  • TAGS

Population density and Circles (to represent earthquakes) on the same Map

javascript,jquery,google-maps,highcharts,jvectormap

jVectorMap suits all your needs. Here is an example of regions density and markers visualisation on the same map.

How to customize jVectorMap region popups?

javascript,jquery,ajax,jvectormap

You can set any content you want for tooltip using onRegionTipShow method. Just take a look at example available here.

Jquery Clickable Map : Africa only map

jquery,jvectormap

If you look at the source from this page, you can see how you can limit the map: jQuery('#vmap').vectorMap({ map: 'africa_en', backgroundColor: null, color: '#ffffff', hoverOpacity: 0.7, selectedColor: '#666666', enableZoom: true, showTooltip: true, scaleColors: ['#C8EEFF', '#006491'], normalizeFunction: 'polynomial' }); Specifically, this line: map: 'africa_en' Though it looks like you may...

How can I set the 'markerStyle' to 'selected' in jVectorMap when the page opens?

javascript,jquery,jvectormap

You can use selectedMarkers options for that. For example the following snippet will make the first and the second markers to be selected on load: selectedMarkers: [0,1] ...

jVectorMap height:% does not work

javascript,css,jvectormap

Try this in your CSS: head { height:100%; } #map1 { position:absolute; height:100%; } Setting the height of the head element to 100% sets the definition for what the map height will be....

jVectorMap - How to get value from markers and store it to a variable

variables,save,jvectormap

Assign the markers array to a variable inside of the anonymous function that you can reference in both the assignment of the map markers and inside the onMarkerClick closure. jsfiddle link: http://jsfiddle.net/hansenmc/3Cf8r/ $(function () { //assign markers to a variable var mapMarkers = [ {latLng: [41.50, -87.37], name: 'Chicago', newvalue:...

SVG find rotation angle of a path

javascript,svg,jvectormap

Looks like squeamish ossifrage has beaten me to this one, and what they've said would be exactly my approach too... Solution Essentially find the longest line segment in each region's path and then orient your text to align with that line segment whilst trying to ensure that the text doesn't...

JVectorMap Scroll Speed and Full screen Issue

javascript,jquery,jvectormap

this might be quite late answer, even might have been already answered somewhere. But i got the same problem with mouse scroll speed and found the solution. It can be fixed in js file in line 2382 zoomStep = Math.pow(1.003, event.deltaY); You can easily change speed by changing that "1.003"...

Can't render region labels with Jvectormap

javascript,jvectormap

You are using an old version of jVectorMap. Region static labels are supported starting version 2.0. Here is an updated fiddle. jquery-jvectormap-2.0.1.min.js ...

JvectorMap Trim data output

javascript,json,trim,jvectormap

I'm assuming the line that has the error is var trim = str.replace(/(^,)|(,$)/g, "");. If I am assuming correctly then that means str is not a string, but rather some other object. In a case like this, you need to inspect "If it's not a string, what is str?" One...

Jvector Map Not Working prepare IE8?

javascript,html,css,internet-explorer-8,jvectormap

This is like the fifth time you're asking the exact same question? I've answered it in the comments, and you keep asking the same thing, with the same code, here Jvector Map Not working correctly IE 8? and here, different user, but exact same code Jvector Map not working when...

Open Different Modals from onMarkerClick

javascript,jquery,html,arrays,jvectormap

You are checking if "tulsa" exists in a markerSet array - this will always return true as that value is always present in the array, so the first modal will always open. You need to pass some sort of identifier for the marker you clicked (eg. your onMarker click might...

jvectormap not able to retrieve map object

javascript,jvectormap

I have the same problem I solve it with that : map = new jvm.Map({ container: jQuery('#world-map'), map: "map", regionsSelectable: true, regionsSelectableOne: true, backgroundColor: 'transparent', zoomMax: 1, zoomMin: 1, zoomOnScroll: false }); map.clearSelectedRegions(); ...

Dynamically change object property

javascript,jquery,jvectormap

You should use setBackgroundColor(). i.e. var bgColor = "red"; var map = new jvm.Map({ container: $('#map'), map: 'world_mill_en', backgroundColor: bgColor }); bgColor = "yellow"; map.setBackgroundColor(bgColor); See the documentation here for more information....

jVectorMap mousewheel zooms in with too few steps

jvectormap

I found a bower package of jvectormap at https://github.com/tlvince/bower-jvectormap that's labeled as version 1.2.2 and here the mousewheel works as expected. The problem still exists in all their demos on the website http://jvectormap.com/ and also in the latest downloadable code (2.0.1) in their official git repository https://github.com/bjornd/jvectormap...

is it possible to wrap an anchor tag around the circle element in an svg element?

javascript,jquery,html,svg,jvectormap

see jsfiddle. This is how you can add anchor tag around the circle element in svg element. <a xlink:href="http://www.example.com" target="_blank"> <circle cx="50" cy="50" r="10" fill="red"/> </a> ...

How to add markers with series with jvectormap?

javascript,jquery,jvectormap

It was easy if you browse the code, but a little tricky. It seems I need to add a list of values, one for each marker type declared on series section of the map. This is my map: var geochart = new jvm.Map({ container: $('.spain-map'), map: 'es_mill_en', markers: markers, series:...

jVectorMap: Update Scale

jquery,json,jvectormap

The final solution I came up with is a more of a work-around: whenever there's new data (values/scale) to be pushed to an existing map, I simply create a new map replacing the old. I'm sure that using the provided methods setValues() and setScale() would be way more efficient, but...

how to change customize label function?

javascript,php,jquery,ajax,jvectormap

You can customise tooltip using onRegionTipShow method. Just take a look at example available here.

How to convert Shapefile to jVectormap?

php,json,shapefile,jvectormap

It looks like the jvectormap project has a converter script available for you to use. It should be able to convert shapefiles (.shp). You can find the python converter script on their github repository: https://github.com/bjornd/jvectormap/blob/master/converter/converter.py The docs at the jvectormap site explain in detail how to use this converter: http://jvectormap.com/documentation/gis-converter/...

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

javascript,jquery,jvectormap

I got it working the way you want and updated your fiddle: http://jsfiddle.net/inanda/ufhz316z/5/ Javascript $('#map').vectorMap({ map: "us_aea_en", backgroundColor: "transparent", regionsSelectable: true, regionsSelectableOne: true, regionStyle: { initial: { fill: "#818486" }, selected: { fill: "#C0C0C0" } }, onRegionClick: function (e, code) { var map = $('#map').vectorMap('get', 'mapObject'); var customTip=$('#customTip'); customTip.css({ left:...