Permalink
Browse files

Merge pull request #147 from MichielDG/patch-1

add MM.Location.fromString function
  • Loading branch information...
2 parents fedc945 + 291f41a commit 3e13683a9132e504abda551d4a52f8ea50b11e32 @mojodna mojodna committed Apr 29, 2016
Showing with 7 additions and 0 deletions.
  1. +7 −0 modestmaps.js
View
7 modestmaps.js
@@ -400,6 +400,13 @@ var MM = com.modestmaps = {
// map it into 0-360 range
return (result < 0) ? result + 360 : result;
};
+
+ // Location from string
+ MM.Location.fromString = function(location){
+ var split = feature.split(",");
+ return new MM.Location(split[1],split[0])
+ };
+
// Extent
// ----------
// An object representing a map's rectangular extent, defined by its north,

0 comments on commit 3e13683

Please sign in to comment.