» How can I change the zoom translation vector on a click event?W3f Q&A Site

I’m new to D3. I’m trying to figure out how to add an address search to a map using a mercator projection and vector tiles. I’m using Open Street Map’s nominatim search. The search itself is working just fine. What I need help with is, on clicking the result of a search, I want to zoom in to the new coordinate on my map. Here is a block where the zoom/pan is working except nothing is set up for the onclick on search result: And I’m not sure if this is helpful, but here’s another block, where when you click on the result of a search, it does jump to the right location. However as you can see the coordinates aren’t correct, and the free zoom/pan at any location is a mess. Have you seen [this question](http://stackoverflow.com/questions/14492284/center-a-map-in-d3-given-a-geojson-object)? The same applies if you want to do it for a point. @LarsKotthoff I didn’t come across that question in my search earlier. Thanks so much- it really helps. Source.

Яндекс.Метрика Рейтинг@Mail.ru Free Web Counter
page counter
Last Modified: April 18, 2016 @ 3:10 am