void
void

Reputation: 36703

Zoom in Highmaps based on Lat/Long

I have created a Bubble Highmap using various Lat/ Long and it is working fine. And i used proj4.js to make it work.

This is my series data:

var mapFinalData = [{
                name: 'Countries',
                mapData: mapData,
                color: "#F5F5F5",
                enableMouseTracking: false,
                showInLegend: false,
                nullColor: "#D6D8CB"
            }];
        mapFinalData.push({
                type: 'mapbubble',
                mapData: mapData,
                name: queryGenerator("topic-analysis", "getRawParams").topic,
                data: mapFData,
                joinBy: ['postal-code', 'code'],
                minSize: 8,
                maxSize: 35,
                color: '#028E85',
                tooltip: {
                    backgroundColor:"#444444"
                }
            });

And i am able to plot map successfully.

But i need to zoom in into the map on a click of button to a specific lat/long.

I know i can zoom to a particular region with its code using

$('#container').highcharts().get('EC').zoomTo();

Upvotes: 0

Views: 1097

Answers (1)

Paweł Fus
Paweł Fus

Reputation: 45079

How about using Chart.mapZoom() method? See API. You can get centerX and centerY from Chart.fromLatLonToPoint() method, again: API.

Upvotes: 1

Related Questions