Changeset 896897
- Timestamp:
- 04/18/2014 12:54:11 AM (12 years ago)
- Location:
- embed-osm/trunk
- Files:
-
- 4 edited
-
embed-osm.php (modified) (6 diffs)
-
languages/embed-osm-ja.mo (modified) (previous)
-
languages/embed-osm-ja.po (modified) (1 diff)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
embed-osm/trunk/embed-osm.php
r886612 r896897 4 4 Plugin URI: http://midoriit.com/works/embed-osm.html 5 5 Description: Embed OpenStreetMap on the page/post. 6 Version: 1. 06 Version: 1.1 7 7 Author: Midori IT Office, LLC 8 8 Author URI: http://midoriit.com/ … … 121 121 } 122 122 } 123 echo '</select><br /><br />'; 123 echo '</select> '; 124 echo '<a class="button" onClick="embed_osm_get_cur_pos();">'.__( 'Get Current Position', 'embed-osm' ).'</a><br /><br />'; 124 125 echo '<div id="embmapdiv" style="width:'.$width.'px;height:'.$height.'px;">'; 125 126 echo '</div><br />'; … … 192 193 " lat=\"" + Math.round( lonLat.lat * 100000 ) / 100000 + "\"" + 193 194 " lon=\"" + Math.round( lonLat.lon * 100000 ) / 100000 + "\"" + 194 " zoom=\"" + map.getZoom()+ "\"" +195 " zoom=\"" + zoom + "\"" + 195 196 layer + "]"; 196 197 embed_osm_shortcode.select(); … … 198 199 199 200 function embed_osm_moveend() { 201 zoom = map.getZoom(); 200 202 embed_osm_genshortcode(); 203 } 204 205 function embed_osm_get_cur_pos() { 206 if( navigator.geolocation ) { 207 navigator.geolocation.getCurrentPosition( 208 function(pos) { 209 lonLat = new OpenLayers.LonLat( pos.coords.longitude, pos.coords.latitude ).transform( 210 new OpenLayers.Projection( "EPSG:4326" ), 211 map.getProjectionObject() ); 212 map.setCenter( lonLat, zoom ); 213 } ); 214 } 201 215 } 202 216 … … 382 396 ' : <input type="text" id="embed_osm_zoom" name="embed_osm_zoom" value="'. 383 397 $zoom.'" size="5" readonly><br /><br />'; 398 echo '<a class="button" onClick="embed_osm_get_cur_pos();">'.__( 'Get Current Position', 'embed-osm' ).'</a><br /><br />'; 384 399 echo '<div id="defmapdiv" style="width:'.$width.'px;height:'.$height. 385 400 'px;"></div></td></tr>'; … … 482 497 embed_osm_lat.value = Math.round( lonLat.lat * 100000 ) / 100000; 483 498 embed_osm_lon.value = Math.round( lonLat.lon * 100000 ) / 100000; 484 embed_osm_zoom.value = map.getZoom();499 embed_osm_zoom.value = zoom; 485 500 } 486 501 487 502 function embed_osm_moveend2() { 503 zoom = map.getZoom(); 488 504 embed_osm_getvalue(); 505 } 506 507 function embed_osm_get_cur_pos() { 508 if( navigator.geolocation ) { 509 navigator.geolocation.getCurrentPosition( 510 function(pos) { 511 lonLat = new OpenLayers.LonLat( pos.coords.longitude, pos.coords.latitude ).transform( 512 new OpenLayers.Projection( "EPSG:4326" ), 513 map.getProjectionObject() ); 514 map.setCenter( lonLat, zoom ); 515 } ); 516 } 489 517 } 490 518 -
embed-osm/trunk/languages/embed-osm-ja.po
r886617 r896897 33 33 msgid "View Larger Map" 34 34 msgstr "大きな地図を表示" 35 msgid "Get Current Position" 36 msgstr "現在位置を取得" -
embed-osm/trunk/readme.txt
r895318 r896897 42 42 == Changelog == 43 43 44 = 1.1 = 45 46 * Added 'Get Current Position' button. See screenshots. 47 44 48 = 1.0 = 45 49 46 * Initial release 50 * Initial release.
Note: See TracChangeset
for help on using the changeset viewer.