You are not logged in.

Announcement

*** NOTICE: forum.openstreetmap.org is being retired. Please request a category for your community in the new ones as soon as possible using this process, which will allow you to propose your community moderators.
Please create new topics on the new site at community.openstreetmap.org. We expect the migration of data will take a few weeks, you can follow its progress here.***

#1 2015-08-27 01:22:27

MahoreLee
Member
Registered: 2015-08-27
Posts: 3

Plot address instead of lat and lng

Currently I convert the address to lat and lng in the backend (php) then plot the point with the code below.

var point = new MQA.Poi({ lat: result[i]['Lat'], lng: result[i]['Lng'] });
map.addShape(point);

How would I be able to plot the point with just an address rather than converting it myself.

Offline

#2 2015-08-27 16:29:05

stephan75
Member
Registered: 2008-05-28
Posts: 2,918

Re: Plot address instead of lat and lng

So you have an address and want to get coordinates to this?

Geocoding is the magic word ...

see http://wiki.openstreetmap.org/wiki/Search_engines for all known OSM based geocoding services and software.

Offline

#3 2015-08-27 21:17:49

MahoreLee
Member
Registered: 2015-08-27
Posts: 3

Re: Plot address instead of lat and lng

stephan75 wrote:

So you have an address and want to get coordinates to this?

Geocoding is the magic word ...

see http://wiki.openstreetmap.org/wiki/Search_engines for all known OSM based geocoding services and software.

No, that's what I'm already doing. "Currently I convert the address to lat and lng"

I want to plot the POI directly with an address without having to geocode myself.

Offline

#4 2015-08-27 21:21:38

MahoreLee
Member
Registered: 2015-08-27
Posts: 3

Re: Plot address instead of lat and lng

I finally found the answer: map.geocodeAndAddLocations('Denver CO');

Offline

Board footer

Powered by FluxBB