php - Google Map v3 Shortcode WP Plugin - Generate new Map over old? get Current Location? -


i using google map v3 shortcode plugin

each post have own google map (for ex: [map address="new york, usa" z="15" marker=”yes” ])

i want users type in location (or not) , direction - should cause create new google map direction route.

so wrote:

 <form class="searchform" action="<?php the_permalink(); ?>" method="post" >                             <input type="text" value="<?php echo $address; ?>" name="directions_search" class="field s">                     <input type="submit" value="get directions" name="submit" class="submit button"> </form>     <?php if(isset($_post['directions_search'])){                  $address = htmlspecialchars($_post['directions_search']); echo do_shortcode('[map address="queens, new york"  z="15" marker=”yes” start= "'. $address .'" end="new york, usa"]'); } ?> 
  1. the new google map direction route doesn't appear - think because 2 maps cannot exist @ same time. how can new map appear?

  2. if input blank, how current location of user? (for ex: in cityguide wp theme or in regular google map)

thanks!

here's quite documentation working example: http://code.google.com/intl/en/apis/maps/documentation/javascript/directions.html#directionsrequests

i guess need javascript hooks (event: submit) form (like jquery) , map request.


Comments

Popular posts from this blog

jasper reports - Fixed header in Excel using JasperReports -

media player - Android: mediaplayer went away with unhandled events -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -