We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

how to get logtitude and lattitude with keywords

Thread ID:

Created:

Updated:

Platform:

Replies:

148118 Oct 7,2019 08:48 AM UTC Oct 14,2019 12:03 PM UTC Angular - EJ 2 5
loading
Tags: Maps
Annmaria Cherian
Asked On October 7, 2019 08:48 AM UTC

I am working on the maps in angular7. I want to know how to get longtitude and latitude  from the keywords. 
functionlity: I have an entry field for address. By using specific keywords from that field i want to get  longtitude and latitude and display the "OpenStreetMap" with marker. Also I should able to change marker and get the address.
Thanks in advance

Arun Raji [Syncfusion]
Replied On October 8, 2019 10:58 AM UTC

Hi Annmaria, 
 
Greetings from Syncfusion. 
 
We have validated your scenario. As of now you can specify the latitude and longitude to the data source property of marker settings as depicted below. 
 
Code Snippet 
markerSettings: [ 
    { 
        visible: true, 
        dataSource: [ 
            { 
                name: 'Marker1', 
                latitude: 40.7488758, 
                longitude: -73.9730091 
            }, 
            { 
                name: 'Marker2', 
                latitude: 40.8488758, 
                longitude: -73.9530091 
            } 
        ], 
        animationDuration: 0, 
        shape: 'Circle', 
        tooltipSettings: { 
            visible: true, 
            valuePath: 'name' 
        } 
    } 
] 
 
 
But we suspect that your requirement is to map the latitude and longitude fields from your data source. If this is your exact requirement could you, please confirm on this? So, that we can proceed further to provide you the solution sooner. 
 
Also, if you need to get a latitude and latitude values manually, you can use click event args. In click event you can get the coordinates values of map, where you clicked. Given a sample link below for your reference. 
 
 
Find the documentation link below for marker on maps. 
 

Let us know if you have any concern. 
 
Thanks, 
Arun. 


Annmaria Cherian
Replied On October 8, 2019 11:22 AM UTC

Hi Arun,

Thanks for the replay.
My concern is after the user enters the keywords of the address, a marker should come on the address. For example if user enters a value deira,Dubai,UAE then we want to show marker on the particular address. I think if I am getting longtitude and lattitude of the place then its easy for showing marker. Please help me for the solution and thanks for the information it is very useful for me.

Arun Raji [Syncfusion]
Replied On October 9, 2019 08:34 AM UTC

Hi Annmaria, 
 
Thanks for your revert.  
  
We have validated your query. But using the keyword, we could not get the latitude and longitude values in the maps controls. For this scenario, you have to store the latitude and longitude values of a country or state or address to a keyword. Then in the sample level, from these names we can get the coordinates values and render the marker in desired position. 
 
For your reference, according to the above discussion, we have prepared a simple sample with coordinates values for four countries in the dropdown list, which is having that corresponding country names. While we changing the country in dropdown list, it will return the latitude and longitude values to the marker dataSource. Attached the prepared sample in the below location. 
 
 
 
 
Please let us know if you have any other concern. 
 
Thanks, 
Arun 


Ahmed Hussain
Replied On October 13, 2019 07:14 AM UTC

Hi Arun,

Thanks for your help. I want to know one more thing, from the latitude and logtitude is it possible to find the address? By using dynamic marker i am getting longtitude and latitude so from these values is it possible to find the location?
Thanks in advance

Baby Palanidurai [Syncfusion]
Replied On October 14, 2019 12:03 PM UTC

Hi Ahmed, 

Thanks for your update. 

We have analyzed your query. There is no built-in support to get locations from the dynamic latitude and longitude. But you can store the locations in the data source and get in the events.  

Kindly revert us, if you have any other concerns. 

Regards, 
Baby. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon