Hi, I''d curious how much trouble it will be to try and use Mapstraction in a private network. We have a Google Maps v2 API/service, a Google Earth Enterprise server, various OpenStreetMap datasets/clones and right now I''m not sure which is going to be the most reliable. Mapstraction would definitely help here while I''m developing, but how much change will be needed? Ideally, I''m hoping it would just be "edit this .js file to look at your.local.google.org versus google.com". But obviously it wasn''t designed for this use case (That I''m aware of). Thanks! andy -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.mapstraction.com/pipermail/mapstraction-mapstraction.com/attachments/20120116/818827b1/attachment.htm>
Hi Andy, What is it exactly you''re wanting to test here? If its performance of the different APIs then a. you''d be best using them directly to gauge that and b. look at a network redirection of some kind such as editing your HOSTS file as that may be easier then hacking the JS. If you just want to compare tiles then you can probably set the tilesets up manually using the OpenLayers provider. Derek On Jan 16, 2012 5:38 PM, "andy e" <virtualandy at gmail.com> wrote:> Hi, > > I''d curious how much trouble it will be to try and use Mapstraction in a > private network. We have a Google Maps v2 API/service, a Google Earth > Enterprise server, various OpenStreetMap datasets/clones and right now I''m > not sure which is going to be the most reliable. Mapstraction would > definitely help here while I''m developing, but how much change will be > needed? > > Ideally, I''m hoping it would just be "edit this .js file to look at > your.local.google.org versus google.com". But obviously it wasn''t > designed for this use case (That I''m aware of). > > Thanks! > > andy > > _______________________________________________ > Mapstraction mailing list > Mapstraction at lists.mapstraction.com > http://lists.mapstraction.com/listinfo.cgi/mapstraction-mapstraction.com > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.mapstraction.com/pipermail/mapstraction-mapstraction.com/attachments/20120123/531ed45f/attachment.htm>
Derek, I guess I wanted to make sure I could still develop using Mapstraction in our environment (no Internet connectivity). So even tho I have access to a GMaps API, its the enterprise version and hosted at like 10.10.2.5/maps/something/... And our openstreetmap tiles are at 192.168.1.1/something/... Versus openstreetmap.org. I wasn''t sure how much of this was configurable, I.e. //this is my idea of mapstraction Var map = new Map("http://openstreetmap.org", type: "wms"); Versus //heres how it works I need to edit something Var map = new OpenStreetMap(); //where''s the URL stored? Or if I have to edit a file in the lib or in a hosts file (although hosts names are diff URIs may also differ i guess) somewhere to point to my alternate reality instances/APIs. Hopefully that makes sense :) Andy Sent from my iPad On Jan 23, 2012, at 12:22 PM, Derek Fowler <dezfowler at gmail.com> wrote:> Hi Andy, > > What is it exactly you''re wanting to test here? > > If its performance of the different APIs then a. you''d be best using them directly to gauge that and b. look at a network redirection of some kind such as editing your HOSTS file as that may be easier then hacking the JS. > > If you just want to compare tiles then you can probably set the tilesets up manually using the OpenLayers provider. > > Derek > > On Jan 16, 2012 5:38 PM, "andy e" <virtualandy at gmail.com> wrote: > Hi, > > I''d curious how much trouble it will be to try and use Mapstraction in a private network. We have a Google Maps v2 API/service, a Google Earth Enterprise server, various OpenStreetMap datasets/clones and right now I''m not sure which is going to be the most reliable. Mapstraction would definitely help here while I''m developing, but how much change will be needed? > > Ideally, I''m hoping it would just be "edit this .js file to look at your.local.google.org versus google.com". But obviously it wasn''t designed for this use case (That I''m aware of). > > Thanks! > > andy > > _______________________________________________ > Mapstraction mailing list > Mapstraction at lists.mapstraction.com > http://lists.mapstraction.com/listinfo.cgi/mapstraction-mapstraction.com > > _______________________________________________ > Mapstraction mailing list > Mapstraction at lists.mapstraction.com > http://lists.mapstraction.com/listinfo.cgi/mapstraction-mapstraction.com-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.mapstraction.com/pipermail/mapstraction-mapstraction.com/attachments/20120123/67252deb/attachment-0001.htm>
Hi Andy, If the interface that Google Enterprise provides is the same (ie, a map is created with "new google.maps.Map"), then Mapstraction should still work. Mapstraction requires you to first include the provider''s own JavaScript directly (Google in this example), then include the appropriate Mapstraction files. Approaching it this way, rather than loading the provider(s) directly, means your situation should work. On Mon, Jan 23, 2012 at 8:30 PM, Andy <virtualandy at gmail.com> wrote:> Derek, > > I guess I wanted to make sure I could still develop using Mapstraction in > our environment (no Internet connectivity). > > So even tho I have access to a GMaps API, its the enterprise version and > hosted at like 10.10.2.5/maps/something/... And our openstreetmap tiles > are at 192.168.1.1/something/... Versus openstreetmap.org. > > I wasn''t sure how much of this was configurable, I.e. > //this is my idea of mapstraction > Var map = new Map("http://openstreetmap.org", type: "wms"); > > Versus > > //heres how it works I need to edit something > Var map = new OpenStreetMap(); //where''s the URL stored? > > Or if I have to edit a file in the lib or in a hosts file (although hosts > names are diff URIs may also differ i guess) somewhere to point to my > alternate reality instances/APIs. > > Hopefully that makes sense :) > > Andy > > Sent from my iPad > > On Jan 23, 2012, at 12:22 PM, Derek Fowler <dezfowler at gmail.com> wrote: > > Hi Andy, > > What is it exactly you''re wanting to test here? > > If its performance of the different APIs then a. you''d be best using them > directly to gauge that and b. look at a network redirection of some kind > such as editing your HOSTS file as that may be easier then hacking the JS. > > If you just want to compare tiles then you can probably set the tilesets > up manually using the OpenLayers provider. > > Derek > On Jan 16, 2012 5:38 PM, "andy e" < <virtualandy at gmail.com> > virtualandy at gmail.com> wrote: > >> Hi, >> >> I''d curious how much trouble it will be to try and use Mapstraction in a >> private network. We have a Google Maps v2 API/service, a Google Earth >> Enterprise server, various OpenStreetMap datasets/clones and right now I''m >> not sure which is going to be the most reliable. Mapstraction would >> definitely help here while I''m developing, but how much change will be >> needed? >> >> Ideally, I''m hoping it would just be "edit this .js file to look at >> <http://your.local.google.org>your.local.google.org versus >> <http://google.com>google.com". But obviously it wasn''t designed for >> this use case (That I''m aware of). >> >> Thanks! >> >> andy >> >> _______________________________________________ >> Mapstraction mailing list >> <Mapstraction at lists.mapstraction.com>Mapstraction at lists.mapstraction.com >> <http://lists.mapstraction.com/listinfo.cgi/mapstraction-mapstraction.com> >> http://lists.mapstraction.com/listinfo.cgi/mapstraction-mapstraction.com >> >> _______________________________________________ > Mapstraction mailing list > Mapstraction at lists.mapstraction.com > http://lists.mapstraction.com/listinfo.cgi/mapstraction-mapstraction.com > > > _______________________________________________ > Mapstraction mailing list > Mapstraction at lists.mapstraction.com > http://lists.mapstraction.com/listinfo.cgi/mapstraction-mapstraction.com > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.mapstraction.com/pipermail/mapstraction-mapstraction.com/attachments/20120123/62045c33/attachment.htm>
Hey Andy - I have *no* idea why you would ever do that! ;) j/k - it''s a great use case and actually a really good example of what Mapstraction can do. I would imagine a case where someone wants to run with a ''cloud mapping provider'' (e.g. Google, Cloudmade, etc.) for tiles and loading when they are online then switch to a local provider of tiles and JS files when they''re offline. You could detect connectivity and load the appropriate provider. As Adam said, you include your own JS, so that''s not a problem. You can load it off of localhost or whatever on the local network. Then you can addTileLayer that can point to a network provider as well when using OpenLayers or Leaflet. Specific to Mapstraction since you provided some wrong examples (though it raises the point that we need some very simple examples up front) that it would help to clarify. <html> <head> <title>Mapstraction Simple Example</title> <style type="text/css"> #mapdiv { height: 400px; } </style> </head> <body> <div id="mapdiv"></div> <script type="text/javascript"> var map; window.onload = function() { var online = false; if(online) { provider = ''googlev3''; } else { provider = ''openlayers'' } map = new mxn.Mapstraction(''mapdiv'', provider); // or switch ''googlev3'' to ''openlayers'' map.addControls({ zoom: ''small'' }); var latlon = new mxn.LatLonPoint(39.74,-104.98); map.setCenterAndZoom(latlon, 10); map.addTileLayer("http://acetate.geoiq.com/tiles/acetate/{Z}/{X}/{Y}.png", 1.0, "GeoIQ Acetate", 1, 19, true); map.toggleTileLayer("http://acetate.geoiq.com/tiles/acetate/{Z}/{X}/{Y}.png") } </script> <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script> <script src="openlayers/OpenLayers.js"></script> <script src="../source/mxn.js?(googlev3,openlayers)" type="text/javascript"></script> </body> </html> -- N.B. the above code won''t work right now. I just implemented the OpenLayers.toggleLayer and will actually have a follow up email about that. HTH, Andrew On Mon, Jan 23, 2012 at 4:02 PM, Adam DuVander <mapstraction at duvander.com> wrote:> Hi Andy, > > If the interface that Google Enterprise provides is the same (ie, a map is > created with "new google.maps.Map"), then Mapstraction should still work. > > Mapstraction requires you to first include the provider''s own JavaScript > directly (Google in this example), then include the appropriate Mapstraction > files. Approaching it this way, rather than loading the provider(s) > directly, means your situation should work. > > > On Mon, Jan 23, 2012 at 8:30 PM, Andy <virtualandy at gmail.com> wrote: >> >> Derek, >> >> I guess I wanted to make sure I could still develop using Mapstraction in >> our environment (no Internet connectivity). >> >> So even tho I have access to a GMaps API, its the enterprise version and >> hosted at like 10.10.2.5/maps/something/... And our openstreetmap tiles are >> at 192.168.1.1/something/... Versus openstreetmap.org. >> >> I wasn''t sure how much of this was configurable, I.e. >> //this is my idea of mapstraction >> Var map = new Map("http://openstreetmap.org", type: "wms"); >> >> Versus >> >> //heres how it works I need to edit something >> Var map = new OpenStreetMap(); //where''s the URL stored? >> >> Or if I have to edit a file in the lib or in a hosts file (although hosts >> names are diff URIs may also differ i guess) somewhere to point to my >> alternate reality instances/APIs. >> >> Hopefully that makes sense :) >> >> Andy >> >> Sent from my iPad >> >> On Jan 23, 2012, at 12:22 PM, Derek Fowler <dezfowler at gmail.com> wrote: >> >> Hi Andy, >> >> What is it exactly you''re wanting to test here? >> >> If its performance of the different APIs then a. you''d be best using them >> directly to gauge that and b. look at a network redirection of some kind >> such as editing your HOSTS file as that may be easier then hacking the JS. >> >> If you just want to compare tiles then you can probably set the tilesets >> up manually using the OpenLayers provider. >> >> Derek >> >> On Jan 16, 2012 5:38 PM, "andy e" <virtualandy at gmail.com> wrote: >>> >>> Hi, >>> >>> I''d curious how much trouble it will be to try and use Mapstraction in a >>> private network. We have a Google Maps v2 API/service, a Google Earth >>> Enterprise server, various OpenStreetMap datasets/clones and right now I''m >>> not sure which is going to be the most reliable. Mapstraction would >>> definitely help here while I''m developing, but how much change will be >>> needed? >>> >>> Ideally, I''m hoping it would just be "edit this .js file to look at >>> your.local.google.org versus google.com". But obviously it wasn''t designed >>> for this use case (That I''m aware of). >>> >>> Thanks! >>> >>> andy >>> >>> _______________________________________________ >>> Mapstraction mailing list >>> Mapstraction at lists.mapstraction.com >>> http://lists.mapstraction.com/listinfo.cgi/mapstraction-mapstraction.com >>> >> _______________________________________________ >> Mapstraction mailing list >> Mapstraction at lists.mapstraction.com >> http://lists.mapstraction.com/listinfo.cgi/mapstraction-mapstraction.com >> >> >> _______________________________________________ >> Mapstraction mailing list >> Mapstraction at lists.mapstraction.com >> http://lists.mapstraction.com/listinfo.cgi/mapstraction-mapstraction.com >> > > > _______________________________________________ > Mapstraction mailing list > Mapstraction at lists.mapstraction.com > http://lists.mapstraction.com/listinfo.cgi/mapstraction-mapstraction.com >-- Andrew Turner mobile: 248.982.3609 andrew at fortiusone.com http://highearthorbit.com http://geocommons.com? ? ? ? ?? Helping build the Geospatial Web Introduction to Neogeography - http://oreilly.com/catalog/neogeography
On Mon, Jan 23, 2012 at 8:01 PM, Andrew Turner <andrew at highearthorbit.com>wrote:> Hey Andy - I have *no* idea why you would ever do that! ;) >Haha. Me neither. Seriously, sometimes I don''t how we function in bizarro land like this.> > j/k - it''s a great use case and actually a really good example of what > Mapstraction can do. I would imagine a case where someone wants to run > with a ''cloud mapping provider'' (e.g. Google, Cloudmade, etc.) for > tiles and loading when they are online then switch to a local provider > of tiles and JS files when they''re offline. You could detect > connectivity and load the appropriate provider. > > As Adam said, you include your own JS, so that''s not a problem. You > can load it off of localhost or whatever on the local network. Then > you can addTileLayer that can point to a network provider as well when > using OpenLayers or Leaflet. >OK, thanks for explaining. I figured this was very RTFM stuff, but since our use case is so weird, it didn''t hurt to ask/discuss.> > Specific to Mapstraction since you provided some wrong examples > (though it raises the point that we need some very simple examples up > front) that it would help to clarify. > > <html> > <head> > <title>Mapstraction Simple Example</title> > <style type="text/css"> > #mapdiv { height: 400px; } > </style> > > </head> > <body> > > <div id="mapdiv"></div> > <script type="text/javascript"> > var map; > window.onload = function() { > var online = false; > if(online) { > provider = ''googlev3''; > } else { > provider = ''openlayers'' > } > map = new mxn.Mapstraction(''mapdiv'', provider); // or switch > ''googlev3'' to ''openlayers'' > map.addControls({ > zoom: ''small'' > }); > > var latlon = new mxn.LatLonPoint(39.74,-104.98); > map.setCenterAndZoom(latlon, 10); > map.addTileLayer(" > http://acetate.geoiq.com/tiles/acetate/{Z}/{X}/{Y}.png", > 1.0, "GeoIQ Acetate", 1, 19, true); > map.toggleTileLayer(" > http://acetate.geoiq.com/tiles/acetate/{Z}/{X}/{Y}.png") > } > </script> > > <script type="text/javascript" > src="http://maps.google.com/maps/api/js?sensor=false"></script> > <script src="openlayers/OpenLayers.js"></script> > <script src="../source/mxn.js?(googlev3,openlayers)" > type="text/javascript"></script> > > </body> > </html> >Got it. Here''s the example that had me curious: var mapstraction; function initialize() { mapstraction = new mxn.Mapstraction(''map_canvas'',''yahoo''); // My thought - oh no! How does it know what ''yahoo'' is. What if my ''yahoo'' is ''10.0.0.1''? mapstraction.setCenterAndZoom(new mxn.LatLonPoint(37.75,-122.44), 8); } As usual, looks like best approach is going to be to just give it a shot. There is a high likelihood that whatever provider I use (Google Enterprise, OpenStreetMap or your GeoIQ version I have) will have to change often, due to network limitations at the various places I''d like to deploy. Mapstraction could really save me a lot of time in that cse. Thanks for all the help, Andy> -- > > N.B. the above code won''t work right now. I just implemented the > OpenLayers.toggleLayer and will actually have a follow up email about > that. > > HTH, > Andrew > > > > > > On Mon, Jan 23, 2012 at 4:02 PM, Adam DuVander > <mapstraction at duvander.com> wrote: > > Hi Andy, > > > > If the interface that Google Enterprise provides is the same (ie, a map > is > > created with "new google.maps.Map"), then Mapstraction should still work. > > > > Mapstraction requires you to first include the provider''s own JavaScript > > directly (Google in this example), then include the appropriate > Mapstraction > > files. Approaching it this way, rather than loading the provider(s) > > directly, means your situation should work. > > > > > > On Mon, Jan 23, 2012 at 8:30 PM, Andy <virtualandy at gmail.com> wrote: > >> > >> Derek, > >> > >> I guess I wanted to make sure I could still develop using Mapstraction > in > >> our environment (no Internet connectivity). > >> > >> So even tho I have access to a GMaps API, its the enterprise version and > >> hosted at like 10.10.2.5/maps/something/... And our openstreetmap > tiles are > >> at 192.168.1.1/something/... Versus openstreetmap.org. > >> > >> I wasn''t sure how much of this was configurable, I.e. > >> //this is my idea of mapstraction > >> Var map = new Map("http://openstreetmap.org", type: "wms"); > >> > >> Versus > >> > >> //heres how it works I need to edit something > >> Var map = new OpenStreetMap(); //where''s the URL stored? > >> > >> Or if I have to edit a file in the lib or in a hosts file (although > hosts > >> names are diff URIs may also differ i guess) somewhere to point to my > >> alternate reality instances/APIs. > >> > >> Hopefully that makes sense :) > >> > >> Andy > >> > >> Sent from my iPad > >> > >> On Jan 23, 2012, at 12:22 PM, Derek Fowler <dezfowler at gmail.com> wrote: > >> > >> Hi Andy, > >> > >> What is it exactly you''re wanting to test here? > >> > >> If its performance of the different APIs then a. you''d be best using > them > >> directly to gauge that and b. look at a network redirection of some kind > >> such as editing your HOSTS file as that may be easier then hacking the > JS. > >> > >> If you just want to compare tiles then you can probably set the tilesets > >> up manually using the OpenLayers provider. > >> > >> Derek > >> > >> On Jan 16, 2012 5:38 PM, "andy e" <virtualandy at gmail.com> wrote: > >>> > >>> Hi, > >>> > >>> I''d curious how much trouble it will be to try and use Mapstraction in > a > >>> private network. We have a Google Maps v2 API/service, a Google Earth > >>> Enterprise server, various OpenStreetMap datasets/clones and right now > I''m > >>> not sure which is going to be the most reliable. Mapstraction would > >>> definitely help here while I''m developing, but how much change will be > >>> needed? > >>> > >>> Ideally, I''m hoping it would just be "edit this .js file to look at > >>> your.local.google.org versus google.com". But obviously it wasn''t > designed > >>> for this use case (That I''m aware of). > >>> > >>> Thanks! > >>> > >>> andy > >>> > >>> _______________________________________________ > >>> Mapstraction mailing list > >>> Mapstraction at lists.mapstraction.com > >>> > http://lists.mapstraction.com/listinfo.cgi/mapstraction-mapstraction.com > >>> > >> _______________________________________________ > >> Mapstraction mailing list > >> Mapstraction at lists.mapstraction.com > >> > http://lists.mapstraction.com/listinfo.cgi/mapstraction-mapstraction.com > >> > >> > >> _______________________________________________ > >> Mapstraction mailing list > >> Mapstraction at lists.mapstraction.com > >> > http://lists.mapstraction.com/listinfo.cgi/mapstraction-mapstraction.com > >> > > > > > > _______________________________________________ > > Mapstraction mailing list > > Mapstraction at lists.mapstraction.com > > http://lists.mapstraction.com/listinfo.cgi/mapstraction-mapstraction.com > > > > > > -- > Andrew Turner > mobile: 248.982.3609 > andrew at fortiusone.com > http://highearthorbit.com > > http://geocommons.com Helping build the Geospatial Web > Introduction to Neogeography - http://oreilly.com/catalog/neogeography > _______________________________________________ > Mapstraction mailing list > Mapstraction at lists.mapstraction.com > http://lists.mapstraction.com/listinfo.cgi/mapstraction-mapstraction.com >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.mapstraction.com/pipermail/mapstraction-mapstraction.com/attachments/20120126/152c5cad/attachment.htm>