1

I'm trying to do some kind of embed map and i see the way Google maps works. For exaple Google maps creates a URL like below :

https://www.google.es/maps/@39.4379818,-0.4569777,17z

Where it takes the latitude, longitude and zoom of the map's view you're at this moment. And when you zoom or move those parametes change in real time. And if you open that link you go to the zone shown by the parameters in URL.

My questions are? How it's done? It can be done only using client side code?

  • 1
    The dynamic link (maintaining the zoom and coordianates ) is fairly simple to recreate using Leaflet hash. – Hasan Mustafa Apr 29 '16 at 11:05
  • I know the hash property w3schools.com/jsref/prop_loc_hash.asp (window.location.hash), but i need for openlayers 3. Also google maps uses '@'... I don't know what they do. But thanks for your answer! =) – Jose Hermosilla Rodrigo Apr 29 '16 at 11:09
  • 1
    In that case you should take a look at this. If you are looking for a solution on a specific platform (like OL3) it's good practice to explicitly mention it in the question. – Hasan Mustafa Apr 29 '16 at 11:14
  • You're right I forgot say openlayers 3 as patform! Thank you for all! – Jose Hermosilla Rodrigo Apr 29 '16 at 11:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.