#Does anyone have experience with Maps API?
19 messages · Page 1 of 1 (latest)
Ah yea. I want user to input a zip code so it will show on the map
I have the map, geocode api but I dont know how to connect both together
Can you share what you have so far using something like code pen
Code Pen is nice because it'll let people see what's going on, not just look at the code.
You can use your API key to create an iframe that you center at the latitude and longitude the that the geocoding API gives you. This is an example of what the iframe HTML needs to be. You can adjust the zoom as needed from 0 (zoomed out all the way) to 21 (zoomed into the buildings).
<iframe width="450" height="250" frameborder="0" style="border:0" referrerpolicy="no-referrer-when-downgrade" src="https://www.google.com/maps/embed/v1/view?key=AIzaSyCjyreOfAiStJe-xlp6Ixj-M5xyL-B1b9w¢er=33.9697897,-118.2468148&zoom=8" allowfullscreen="">
</iframe>
does the iframe map center sync with the user input?
You'd need to code it to update when the button is pressed.
ohh cant I code something more simple with my code right now?
sorry im kinda new into API's. I thought it could be solved with a change at "center:" and some few codes more
It's super simple to do with the code you have now. You've just gotta add an iframe to your output that has the center set to the lat,lng