Displaying 12 results from an estimated 12 matches for "latlonpoint".
2007 Jul 25
1
regarding polylines
hi all, i am experimenting with ym4r mapstraction, i am using yahoo api
, when i tried polylines , its not showing up.. the code is
var map;
window.onload = addCodeToFunction(window.onload,function() {
map = new Mapstraction("map_div","yahoo");
map.setCenterAndZoom(new LatLonPoint(37.3853,-122.0172
),12);map.addSmallControls();
map.addMarkerGroup(new MarkerGroup([addDataToMarker(new Marker(new
LatLonPoint(37.3853,-122.0172)),{infoBubble : "Maude & Fair Oaks <br/> Next
bus is at 14:19:00"}),addDataToMarker(new Marker(new LatLonPoint(37.3958,-
121.9914)),{...
2010 Jan 13
8
How to use getCenter
Hi,
I am starting to use Mapstraction with the openlayers provider, and I am not
sure how to retrieve the current center of a map in a cross-provider way.
i.e. currently when calling map.getCenter(), the result returned is the
openlayers internal one, not the long/lat used when calling setCenter().
Is that the expected behaviour?
Regards,
Philippe
-------------- next part --------------
An
2010 Apr 30
6
addListener
I am trying to use the marker method addlistener(). A simplified version
of what I''m trying to do:
var map;
var marker;
map = new mxn.Mapstraction(''myMap'',''google'');
map.setCenterAndZoom(new mxn.LatLonPoint(45.559242,-122.636467),
15);
marker = new mxn.Marker(new mxn.LatLonPoint(45.559242,
-122.636467));
marker.addData({icon:
"http://mapscripting.com/examples/mashups/richter-high.png"});
map.addMarker(marker);
marker.addListener(''click'...
2009 Jan 21
7
Panning map to a point vs. setCenter
...t know how to go about committing the change to svn, or who
decides whether my naming convention is worthy, but I thought I''d
share the function below.
--Adam
---
Adam DuVander
I like simple: http://adamduvander.com
/**
* panCenter pans to a new central point of the map
* @param {LatLonPoint} point The point at which to center the map
*/
Mapstraction.prototype.panCenter = function(point) {
if(this.loaded[this.api] === false) {
var me = this;
this.onload[this.api].push( function() {
me.panCenter(point);
} );
return;
}
va...
2009 Oct 22
6
Mapstraction V2 Geocoder?
Hey all,
I''m wondering about your thoughts on upgrading the Geocoder to use
Mapstraction V2. Currently it uses the old syntax (i.e., for
LatLonPoint, etc.):
http://mapstraction.appspot.com/#geocoding
Moving from V1 to V2 is fairly simple changes to the code. However, I
wonder whether we want to update the way the geocoder is structured,
as well? Some options:
1) Roll geocoding into core, so that each provider could implement the
interfac...
2008 Jun 20
2
map24 help
...quot;text/javascript" src="mapstraction.js"></script>
<script type="text/javascript">
var mapstraction = new
Mapstraction(''mapstraction'',''map24'',''FJX534f6ceaeaf971137bc628c468279X13'');
var myPoint = new LatLonPoint(37.4041960114344,-122.008194923401);
mapstraction.setCenterAndZoom(myPoint, 10);
Thanks,
Shawn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mapstraction.com/pipermail/mapstraction-mapstraction.com/attachments/20080620/af2bc332/attachment.htm>...
2009 Jun 01
0
[mapstraction commit] r12 - Implemented most Cloudmade functions. Still requires image, tile and KML/GeoRSS overlays
...removeOverlay(polyline.proprietary_polyline);
},
getCenter: function() {
- var point;
var map = this.maps[this.api];
+ var pt = map.getCenter();
- // TODO: Add provider code
-
- return point;
+ return new mxn.LatLonPoint(pt.lat(), pt.lng());
},
setCenter: function(point, options) {
var map = this.maps[this.api];
var pt = point.toProprietary(this.api);
-
+ if(options != null && options.pan) { map.panTo(pt); }
+ else { map.setCenter(pt); }...
2008 May 20
1
AddOverlay for GeoRss Feeds, GeoRSS support
...ot;mapstraction"></div>
> <script type="text/javascript">
>
> // initialise the map with your choice of API
> var mapstraction = new Mapstraction(''mapstraction'',''google'');
>
> var myPoint = new LatLonPoint(37.4041960114344,-122.008194923401);
> // display the map centered on a latitude and longitude (Google zoom
> levels)
> mapstraction.setCenterAndZoom(myPoint, 3);
> mapstraction.addControls({zoom: ''large''});
>
> mapstraction.addOverlay("htt...
2009 Nov 04
0
r53 committed - applied patch from John McKerrell
...,
function(location,marker) {
+ if ( marker && marker.mapstraction_marker ) {
+ marker.mapstraction_marker.click.fire();
+ }
+ else if ( location ) {
+ me.click.fire({''location'': new
mxn.LatLonPoint(location.lat(), location.lng())});
+ }
+
+ // If the user puts their own Google markers directly on
the map
+ // then there is no location and this event should not
fire.
+ if ( location ) {
+
me.clickHandler(locat...
2008 Mar 01
0
package name for mapstraction
Hi,
Can you consider adding a package name / namespace to the mapstraction
classes.
For example new mapstr.LatLonPoint(..)
This will help avoid potential conflicts with other JS libraries.
Thanks,
Sanjiv
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.mapstraction.com/pipermail/mapstraction-mapstraction.com/attachments/20080301/230c7962/attachment.htm
2009 Dec 13
0
r65 committed - Use the GeoCommons addOverlay method
...toProprietary(this.api);
+ // TODO: Add provider code
+ // map.addOverlay(pl);
+ return pl;
+ },
+
+ removePolyline: function(polyline) {
+ var map = this.maps[this.api];
+ // TODO: Add provider code
+ }
+
+
},
LatLonPoint: {
toProprietary: function() {
// TODO: Add provider code
+ return {};
},
fromProprietary: function(googlePoint) {
@@ -239,6 +289,7 @@
toProprietary: function() {
// TODO: Add provider code
+ return {};...
2009 Jan 08
20
Mapstraction V2 Architecture Demo
Hi all,
I''ve been fiddling with some mapstraction architecture ideas and before I
lose my mind (caller, calleee, apply, arguments, pop!), I wanted to share my
progress.
Please see here for details:
http://www.thegecko.org/mapstractionv2/
I''m by no means a javascript guru, so I would appreciate any feedback you
may have :)
Kind regards,
Rob
-------------- next part