The problem i have, i almost solved, i guess i am ready but always i get a back-draw, but i see other developer have could do it.
I made the custom map, geometry as follow:
Code: Select all
var mapa3 = {
"type": "FeatureCollection",
"crs": {
"type": "Name",
"properties": {
"name": "urn:ogc:def:crs:OGC:1.3:CRS84"
}
},
"hc-transform": {
"default": {
"crs": "+proj=utm +zone=19 +datum=WGS84 +units=m +no_defs",
"jsonres": 15.5
}
},
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"Name": "NHS Eastern Cheshire",
},
"geometry": {
"type": "MultiPolygon",
"coordinates": [
[
[
[
-71.12995147705077,
-30.27226265850092
],
[
-71.12995147705077,
-30.22199183320206
],
[
-71.04721069335938,
-30.22199183320206
],
[
-71.04721069335938,
-30.27226265850092
],
[
-71.12995147705077,
-30.27226265850092
]
]
]
]
}
}
]
};
The problem is, that when i set a point certain located into the boundaries, it does not appear where i am expecting it to be
The calling function is:
Code: Select all
$(function () {
// Initiate the chart
$('#container').highcharts('Map', {
title: {
text: 'Highmaps basic lat/lon demo'
},
mapNavigation: {
enabled: true
},
tooltip: {
headerFormat: '',
pointFormat: '<b>{point.name}</b><br>Lat: {point.lat}, Lon: {point.lon}'
},
series: [{
// Use the gb-all map with no data as a basemap
// mapData: Highcharts.maps['countries/gb/gb-all'],
type: 'map',
mapData: mapa3,
name: 'Basemap',
borderColor: '#A0A0A0',
nullColor: 'rgba(200, 200, 200, 0.3)',
showInLegend: false
},{
// Specify points using lat/lon
type: 'mappoint',
name: 'Cities',
color: Highcharts.getOptions().colors[1],
data: [{
name: 'A',
lat: -30.2419,
lon: -71.108
},
{
name: 'Bdfd',
lat: -30.2519,
lon: -71.105
}
]
}]
});
});
I want to set a background image that fits with those boundaries, and set point into the box
The development which i have based mine it is made by a guy from England
https://jsfiddle.net/markysoft/haghpg4d/
That map fits, well in the real map as expected, and items are set as he wants, by coordinates
Thanks for any hint, good day