[mapserver-users] How to use an ArcGIS geocoding service

Robert Hollingsworth reh2 at prodigy.net
Sun Aug 15 14:40:25 EDT 2010


Bob,
Without knowing more details of your app environment, I'd approach as follows:

Have your client-side code collect the user's address entry and include it as an 
arg to your php/mapscript program (which will return a map image).  Have the 
php encode the user's address into the ArcGIS Service params.  I believe your 
php can be an HTTP client of Arc or anyone else using the cURL library.  Retrieve 
the response from ArcGIS, extract the coords.  Build a mapscript PointObj using
those coords, and draw it onto a POINT layer on the image you will dump to the 
client at the end.  If you have a mapfile feeding your php, the POINT layer can be 
defined there as having no data source or connectiontype, status OFF, and styled 
to draw an appropriate symbol at the geocode location.  You might center the 
output image on the returned point.

There might be more elegant ways to do this on the php side, or, if you're 
running OpenLayers client-side, I think you can call ArcGIS directly from 
client-side, and have OpenLayers create a marker from the returned location and 
drop that over a generic map image returned by mapscript.

I hope this helps.  (sorry if this message doesn't get inserted into your thread; I
receive mapserver-users as a digest)

Robert H.


I’m building a PHP/MapServer application
 which needs to perform geocoding.  I’m aware that MapServer itself does
 not geocode.  I intend to use a geocoding service hosted on ArcGIS 
Server.  

The intent is to have input boxes where 
the user can enter an address, send this to the geocoding service, and 
have it return coordinates of the location.

Can anyone point me to an example of how to do this with PHP/Mapscript?  




_________________________________

Bob Bistrais, GISP

Maine Office of Information Technology



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20100815/97d233e3/attachment.html


More information about the mapserver-users mailing list