P
P
Pavel Zhukau2015-11-10 19:21:26
JavaScript
Pavel Zhukau, 2015-11-10 19:21:26

How to redraw map when input changes?

Good evening.
There is a code that draws a map:

var mapLat = 0;
                            var mapLon = 0;
                            var mapObjects = $.parseJSON('[{"latitude":"<?php echo $new == 1 && $sync == 1 ? $plada['latitude'] : $place2->latitude; ?>","longitude":"<?php echo $new == 1 && $sync == 1 ? $plada['longitude'] : $place2->longitude; ?>"}]');
                            var placeId = '<?php echo $place2->id; ?>';
                            adminPage = true;
                            wasMapExpanded = false;

And there are inputs with id latitude_prefix2 and longitude_prefix2, and you need to redraw the map when the coordinate values ​​from the inputs change.
Thanks in advance for your help.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
Foo Bar, 2015-11-10
@atomheart

Write a handler for the keydown event for your imputes, in these handlers you draw a map.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question