[OpenLayers-Users] LonLat.parse(str) or similar?

Matt Williamson MatthewDW at gmail.com
Tue Jul 29 09:55:49 EDT 2008


Hello list,

Sorry if this has been asked before, but is there a utility function  
to parse an arbitrary string (or try to) into a LonLat? E.g. I have a  
form where a user can enter an arbitrary latitude/longitude; I want to  
display that on the map, and as a side effect be able to validate that  
it's a valid coordinate (format, range, etc.).

Just thought I'd ask before re-inventing one. I have a PHP function I  
can port, and I'd be happy to share the result...but it uses a  
ginormous regexp...so I'm not sure if you'll want it :-).

-Matt




More information about the Users mailing list