简体   繁体   中英

World map with Lat/Lon support

I need a vector world map in JS/Flash that supports display of dots based on their lat/lon coordinates. I need to use this for a office locator, for a company with offices around the world. The idea is you click on the office in the list, and the map navigates to the dot of that office. Dots are displayed for all offices.

  • JVectorMap is built with JS, but does not support Lat/Lon, as far as I can see
  • SVG World Map is built with jQuery, but no Lat/Lon, it only supports clicking countries
  • This question (and this gist ) uses D3 to draw a map possibly with Lat/Lon dots
  • Vis4 contains 100+ projections, and possibly supports lat/lon
  • GerbenRobijn has an equirect map with lat/lon support

How do I engineer a map to support Lat/Lon coordinates, and convert X/Y to Lat/Lon (convert mouse coordinates to Lat/Lon), and convert Lat/Lon to X/Y (convert Geo-marker to a dot on the map)

All of the decent map packages have a "Lat/Lon support". The help page for your first example, JVectorMap, describes two functions:

latLngToPoint Converts coordinates expressed as latitude and longitude to the coordinates in pixels on the map.

pointToLatLng Converts cartesian coordinates into coordinates expressed as latitude and longitude.

The 'setFocus' in the same package can accept either lat/lon or x, y coordinates.

I fail to see a problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM