You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to create a new map, calculate the x = xFactor + longitude + xOffset and y = yFactor * latitude + yOffset but at the end its not working fine, here is my map with points places like this picture https://www.vincentbroute.fr/mapael/assets/img/create-map-2.png:
I'm trying to create a new map, calculate the x = xFactor + longitude + xOffset and y = yFactor * latitude + yOffset but at the end its not working fine, here is my map with points places like this picture https://www.vincentbroute.fr/mapael/assets/img/create-map-2.png:
here is on the getcoords function:
And finally my code the map:
`<script type="text/javascript">
/*!
*
* Jquery Mapael - Dynamic maps jQuery plugin (based on raphael.js)
* Requires jQuery and Mapael >=2.0.0
*
* Map of andorra
*
* @author cristian
*/
(function (factory) {
if (typeof exports === 'object') {
// CommonJS
module.exports = factory(require('jquery'), require('jquery-mapael'));
} else if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['jquery', 'mapael'], factory);
} else {
// Browser globals
factory(jQuery, jQuery.mapael);
}
}(function ($, Mapael) {
</script>`
The map generation with points (p5 point is the real location):
<script type="text/javascript"> $(".container").mapael({ map : { name : "andorra", defaultArea: { attrs: { stroke: "#fff", "stroke-width": 1 }, attrsHover: { "stroke-width": 2 } }, defaultPlot : { size:5, attrs: { fill:"red", stroke:"white", "stroke-width":2, opacity:1 } } }, areas: { "path4230": { value: "2617939", href: "#", tooltip: {content: "<span style=\"font-weight:bold;\">Santa Julia de Loria (5)</span><br />Population : 2617939"} }, "path4232": { value: "2268265", href: "#", tooltip: {content: "<span style=\"font-weight:bold;\">Andorra la Vella (6)</span><br />Population : 2268265"} }, "path4234": { value: "2617939", href: "#", tooltip: {content: "<span style=\"font-weight:bold;\">La Massana (7)</span><br />Population : 2617939"} }, "path4236": { value: "2268265", href: "#", tooltip: {content: "<span style=\"font-weight:bold;\">Ordino (1)</span><br />Population : 2268265"} }, "path4238": { value: "2617939", href: "#", tooltip: {content: "<span style=\"font-weight:bold;\">Canillo (2)</span><br />Population : 2617939"} }, "path4242": { value: "2268265", href: "#", tooltip: {content: "<span style=\"font-weight:bold;\">Escaldes-Engordany (4)</span><br />Population : 2268265"} }, "path4240": { value: "2268265", href: "#", tooltip: {content: "<span style=\"font-weight:bold;\">Encamp (3)</span><br />Population : 2268265"} } }, plots: { p1 : { x:55, y:3 }, p2 : { x:270, y:73 }, p3 : { x:5, y:163 }, p4 : { x:75, y:218 }, p5 : { x:42.5787088, y:1.6668454 } } }); </script>
The text was updated successfully, but these errors were encountered: