GPS Coordinates of point

Hi.

I'm testing your control for availability in my new project..

1) when user click in the map, it is possible to get GPS coordinates of this point in my controller?

2) can I move the markers?

Actualy I need to create application with map, where are some markers (some points) and I need to change the location of this points (or create the new ones).

Thanks.
Regards,
Juraj

3 Replies

AT Anandaraj T Syncfusion Team July 3, 2018 08:06 PM UTC

Hi Juraj, 

Thanks for using Syncfusion products. 

Query #1: when user click in the map, it is possible to get GPS coordinates of this point in my controller? 

As of now support for getting co-ordinates when clicking on the map is not available. 

Query #2: can I move the markers? 

We can programmatically move the markers added to map. We have prepared a simple sample for this requirement and it can be downloaded from the following link 

Please refer the following code snippet to achieve this 

[JS] 
 
    function moveMarker() { 
        //get marker datasource 
        var oldMarkerData = maps.layers[0].markerSettings[0].dataSource; 
        var length = oldMarkerData.length;         
 
        for (var i = 0; i < oldMarkerData.length; i++) {             
 
            //update the latitude to new position 
            oldMarkerData[i].latitude = oldMarkerData[i].latitude + 10; 
 
            //update the longitude to new position 
            oldMarkerData[i].longitude = oldMarkerData[i].longitude + 10; 
 
            if (oldMarkerData[i].latitude < -70 || oldMarkerData[i].latitude > 70) 
                oldMarkerData[i].latitude = -50; 
            if (oldMarkerData[i].longitude < -160 || oldMarkerData[i].longitude > 160) 
                oldMarkerData[i].longitude = -150; 
        } 
 
        //Re-render the map 
        maps.createSVG(); 
        maps.render(); 
    } 
 

Please let us know if you have any concern. 

Regards, 
Anand 



JT Juraj Tomana July 4, 2018 11:52 AM UTC

Hi.


Ad query 1) it is really unpleasant for me and without this feature is the control unfortunatelz useless for me. Doesn't really exists some workaround for this.

Thanks.
Regards,
Juraj


AT Anandaraj T Syncfusion Team July 5, 2018 12:55 PM UTC

Hi Juraj, 

Sorry for the inconvenience caused. 

The required functionality can be implemented only in source level due to its complexity. So we are not able to prepare a workaround for this requirement now. 

Please let us know if you have any concern. 

Regards, 
Anand 



Loader.
Up arrow icon