Changeset 1225836
- Timestamp:
- 08/20/2015 04:56:59 AM (11 years ago)
- Location:
- scribble-maps
- Files:
-
- 6 edited
-
readme.txt (modified) (1 diff)
-
trunk/css/scribblemaps.css (modified) (2 diffs)
-
trunk/includes/admin.php (modified) (3 diffs)
-
trunk/js/script.js (modified) (2 diffs)
-
trunk/readme.txt (modified) (1 diff)
-
trunk/scribblemap.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
scribble-maps/readme.txt
r1130088 r1225836 36 36 == Changelog == 37 37 38 = 2.0 = 39 * Fixed sizing issue on editor 40 * Fixed editing issue 41 38 42 = 1.0 = 39 43 * First Version -
scribble-maps/trunk/css/scribblemaps.css
r1046063 r1225836 6 6 } 7 7 #ScribbleMap{ 8 width:600px;8 width:650px; 9 9 height: 500px; 10 10 float: left; … … 31 31 font-weight: bold; 32 32 } 33 34 #mapTypes { 35 position: absolute; 36 right: 10px; 37 bottom: 80px; 38 } 39 40 #mapTypes select { 41 font-family: 'Open Sans', Verdana, Arial; 42 font-weight: bold; 43 font-size: 14px; 44 height: 18px; 45 color: #333333; 46 height: 25px; 47 48 margin: 0; 49 -webkit-border-radius: 5px; 50 -moz-border-radius: 5px; 51 border-radius: 5px; 52 border: 1px solid #999; 53 54 -webkit-touch-callout: none; 55 -webkit-user-select: none; 56 -khtml-user-select: none; 57 -moz-user-select: none; 58 -ms-user-select: none; 59 user-select: none; 60 } -
scribble-maps/trunk/includes/admin.php
r1046063 r1225836 37 37 return $item[$column_name]; 38 38 case 'shortcode': 39 return '[scribblemaps mapid="' . $item["mapid"] . '" width="4 00" height="300"]';39 return '[scribblemaps mapid="' . $item["mapid"] . '" width="450" height="300"]'; 40 40 default: 41 41 return print_r($item, true); //Show the whole array for troubleshooting purposes … … 219 219 wp_enqueue_style('scribble-map-css', SCRIBBLEMAPS_URL . 'css/scribblemaps.css'); 220 220 wp_enqueue_script('scribble-map-js', '//scribblemaps.com/api/js/'); 221 wp_enqueue_script('ajax-script', SCRIBBLEMAPS_URL . 'js/script.js', array('jquery')); 221 wp_enqueue_script('sm-layers', SCRIBBLEMAPS_URL . 'js/layers.js'); 222 wp_enqueue_script('ajax-script', SCRIBBLEMAPS_URL . 'js/script.js', array('jquery', 'sm-layers')); 222 223 wp_localize_script('ajax-script', 'ajax_object', array('ajax_url' => admin_url('admin-ajax.php'))); 223 224 } … … 235 236 <h2>New Scribble Map</h2> 236 237 <?php endif; ?> 237 <div id="popup"> 238 <div id="mapTypes"> 239 <select> 240 <option value="base">Google</option> 241 <option value="mb">MapBox</option> 242 <option value="sm">White Board</option> 243 <option value="osm">Open Street Map</option> 244 <option value="esri">ESRI</option> 245 <option value="astral">Night Sky</option> 246 </select> 247 </div> <div id="popup"> 238 248 <div id="ScribbleMap"></div> 239 249 <div id="instructions"> -
scribble-maps/trunk/js/script.js
r1046063 r1225836 1 1 jQuery(document).ready(function($) { 2 2 3 var editMap = document.getElementById('scribble-edit'); 4 if (null !== editMap) { 5 var mapId = editMap.value 3 4 function getUrlParameter(sParam) { 5 var sPageURL = decodeURIComponent(window.location.search.substring(1)), 6 sURLVariables = sPageURL.split('&'), 7 sParameterName, 8 i; 9 10 for (i = 0; i < sURLVariables.length; i++) { 11 sParameterName = sURLVariables[i].split('='); 12 13 if (sParameterName[0] === sParam) { 14 return sParameterName[1] === undefined ? true : sParameterName[1]; 15 } 16 } 17 }; 18 19 var mapId = getUrlParameter('map'); 20 if (mapId != "" && mapId != null) { 6 21 var sm = new ScribbleMap("ScribbleMap"); 7 22 sm.map.load({"id": mapId}, function(data) { … … 10 25 } else { 11 26 var sm = new scribblemaps.ScribbleMap('ScribbleMap'); 27 sm.map.createNewMap(); 12 28 } 29 30 function changeMapTypes(skipTypeSet) { 31 var types = []; 32 33 var val = $("#mapTypes select").val(); 34 35 if (val == "base") { 36 types = [ 37 { 38 id: "hybrid", 39 label: "Hybrid" 40 }, 41 { 42 id: "road", 43 label: "Road" 44 }, 45 { 46 id: "satellite", 47 label: "Satellite" 48 }, 49 { 50 id: "terrain", 51 label: "Terrain" 52 } 53 ]; 54 } else { 55 for (var i = 0; i < smLayers[val].length; i++) { 56 types.push({ 57 label: smLayers[val][i].label, 58 id: smLayers[val][i].id 59 }); 60 } 61 } 62 63 sm.ui.setMapTypes(types); 64 65 if (types[0].id != sm.map.getType() && !skipTypeSet) { 66 sm.map.setType(types[0].id); 67 } 68 } 69 70 sm.map.addListener(scribblemaps.MapEvent.BASE_TYPE_CHANGED, function (event) { 71 var gid = getGroupId(sm.map.getType()); 72 73 if (gid && gid != $("#mapTypes select").val()) { 74 if (gid == "custom") { 75 if ($("#mapTypes select option[value='custom']").length == 0) { 76 $("#mapTypes select").append($('<option>', { 77 value: "custom", 78 text: 'Custom' 79 })); 80 } 81 } 82 $("#mapTypes select").val(gid); 83 $("#mapTypes select").change(); 84 updateUrl(true); 85 } 86 }); 87 88 sm.addListener("ready", function () { 89 createLayers(sm); 90 sm.ui.hideMenuIcon(scribblemaps.MenuType.NEW_MAP); 91 92 sm.ui.addDomElement($("#mapTypes").show()[0]); 93 $("#mapTypes select").change(function () { 94 changeMapTypes(); 95 }); 96 }); 97 13 98 sm.map.addListener(scribblemaps.MapEvent.MAP_SAVED, function(event) { 14 99 var mapData = sm.map.getWorkingInfo(); -
scribble-maps/trunk/readme.txt
r1130094 r1225836 39 39 == Changelog == 40 40 41 = 1.1 = 42 * Increased size of editor 43 * Added Other Map Types 44 * Fixed bug with editing maps 45 41 46 = 1.0 = 42 47 * First Version -
scribble-maps/trunk/scribblemap.php
r1046063 r1225836 3 3 Plugin Name: Scribble Maps 4 4 Description: Plugin create and embed Scribble Maps 5 Version: 1. 05 Version: 1.1 6 6 Author: Scribble Maps 7 7 Author URI: http://www.scribblemaps.com/
Note: See TracChangeset
for help on using the changeset viewer.